michael@0: /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ michael@0: /* vim: set sw=2 ts=8 et tw=80 : */ michael@0: michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #include "mozilla/net/PNeckoParent.h" michael@0: #include "mozilla/net/NeckoCommon.h" michael@0: michael@0: #ifndef mozilla_net_NeckoParent_h michael@0: #define mozilla_net_NeckoParent_h michael@0: michael@0: namespace mozilla { michael@0: namespace net { michael@0: michael@0: // Used to override channel Private Browsing status if needed. michael@0: enum PBOverrideStatus { michael@0: kPBOverride_Unset = 0, michael@0: kPBOverride_Private, michael@0: kPBOverride_NotPrivate michael@0: }; michael@0: michael@0: // Header file contents michael@0: class NeckoParent : michael@0: public PNeckoParent michael@0: { michael@0: public: michael@0: NeckoParent(); michael@0: virtual ~NeckoParent(); michael@0: michael@0: MOZ_WARN_UNUSED_RESULT michael@0: static const char * michael@0: GetValidatedAppInfo(const SerializedLoadContext& aSerialized, michael@0: PBrowserParent* aBrowser, michael@0: uint32_t* aAppId, michael@0: bool* aInBrowserElement); michael@0: michael@0: MOZ_WARN_UNUSED_RESULT michael@0: static const char * michael@0: GetValidatedAppInfo(const SerializedLoadContext& aSerialized, michael@0: PContentParent* aBrowser, michael@0: uint32_t* aAppId, michael@0: bool* aInBrowserElement); michael@0: michael@0: /* michael@0: * Creates LoadContext for parent-side of an e10s channel. michael@0: * michael@0: * PContentParent corresponds to the process that is requesting the load. michael@0: * michael@0: * Returns null if successful, or an error string if failed. michael@0: */ michael@0: MOZ_WARN_UNUSED_RESULT michael@0: static const char* michael@0: CreateChannelLoadContext(PBrowserParent* aBrowser, michael@0: PContentParent* aContent, michael@0: const SerializedLoadContext& aSerialized, michael@0: nsCOMPtr &aResult); michael@0: michael@0: virtual void michael@0: CloneManagees(ProtocolBase* aSource, michael@0: mozilla::ipc::ProtocolCloneContext* aCtx) MOZ_OVERRIDE; michael@0: virtual PCookieServiceParent* AllocPCookieServiceParent() MOZ_OVERRIDE; michael@0: virtual bool michael@0: RecvPCookieServiceConstructor(PCookieServiceParent* aActor) MOZ_OVERRIDE michael@0: { michael@0: return PNeckoParent::RecvPCookieServiceConstructor(aActor); michael@0: } michael@0: michael@0: protected: michael@0: virtual PHttpChannelParent* michael@0: AllocPHttpChannelParent(PBrowserParent*, const SerializedLoadContext&, michael@0: const HttpChannelCreationArgs& aOpenArgs) MOZ_OVERRIDE; michael@0: virtual bool michael@0: RecvPHttpChannelConstructor( michael@0: PHttpChannelParent* aActor, michael@0: PBrowserParent* aBrowser, michael@0: const SerializedLoadContext& aSerialized, michael@0: const HttpChannelCreationArgs& aOpenArgs) MOZ_OVERRIDE; michael@0: virtual bool DeallocPHttpChannelParent(PHttpChannelParent*) MOZ_OVERRIDE; michael@0: virtual bool DeallocPCookieServiceParent(PCookieServiceParent*) MOZ_OVERRIDE; michael@0: virtual PWyciwygChannelParent* AllocPWyciwygChannelParent() MOZ_OVERRIDE; michael@0: virtual bool DeallocPWyciwygChannelParent(PWyciwygChannelParent*) MOZ_OVERRIDE; michael@0: virtual PFTPChannelParent* michael@0: AllocPFTPChannelParent(PBrowserParent* aBrowser, michael@0: const SerializedLoadContext& aSerialized, michael@0: const FTPChannelCreationArgs& aOpenArgs) MOZ_OVERRIDE; michael@0: virtual bool michael@0: RecvPFTPChannelConstructor( michael@0: PFTPChannelParent* aActor, michael@0: PBrowserParent* aBrowser, michael@0: const SerializedLoadContext& aSerialized, michael@0: const FTPChannelCreationArgs& aOpenArgs) MOZ_OVERRIDE; michael@0: virtual bool DeallocPFTPChannelParent(PFTPChannelParent*) MOZ_OVERRIDE; michael@0: virtual PWebSocketParent* michael@0: AllocPWebSocketParent(PBrowserParent* browser, michael@0: const SerializedLoadContext& aSerialized) MOZ_OVERRIDE; michael@0: virtual bool DeallocPWebSocketParent(PWebSocketParent*) MOZ_OVERRIDE; michael@0: virtual PTCPSocketParent* AllocPTCPSocketParent() MOZ_OVERRIDE; michael@0: michael@0: virtual PRemoteOpenFileParent* AllocPRemoteOpenFileParent(const URIParams& aFileURI, michael@0: const OptionalURIParams& aAppURI) michael@0: MOZ_OVERRIDE; michael@0: virtual bool RecvPRemoteOpenFileConstructor(PRemoteOpenFileParent* aActor, michael@0: const URIParams& aFileURI, michael@0: const OptionalURIParams& aAppURI) michael@0: MOZ_OVERRIDE; michael@0: virtual bool DeallocPRemoteOpenFileParent(PRemoteOpenFileParent* aActor) michael@0: MOZ_OVERRIDE; michael@0: michael@0: virtual bool DeallocPTCPSocketParent(PTCPSocketParent*) MOZ_OVERRIDE; michael@0: virtual PTCPServerSocketParent* michael@0: AllocPTCPServerSocketParent(const uint16_t& aLocalPort, michael@0: const uint16_t& aBacklog, michael@0: const nsString& aBinaryType) MOZ_OVERRIDE; michael@0: virtual bool RecvPTCPServerSocketConstructor(PTCPServerSocketParent*, michael@0: const uint16_t& aLocalPort, michael@0: const uint16_t& aBacklog, michael@0: const nsString& aBinaryType) MOZ_OVERRIDE; michael@0: virtual bool DeallocPTCPServerSocketParent(PTCPServerSocketParent*) MOZ_OVERRIDE; michael@0: virtual PUDPSocketParent* AllocPUDPSocketParent(const nsCString& aHost, michael@0: const uint16_t& aPort, michael@0: const nsCString& aFilter) MOZ_OVERRIDE; michael@0: virtual bool RecvPUDPSocketConstructor(PUDPSocketParent*, michael@0: const nsCString& aHost, michael@0: const uint16_t& aPort, michael@0: const nsCString& aFilter) MOZ_OVERRIDE; michael@0: virtual bool DeallocPUDPSocketParent(PUDPSocketParent*) MOZ_OVERRIDE; michael@0: virtual PDNSRequestParent* AllocPDNSRequestParent(const nsCString& aHost, michael@0: const uint32_t& aFlags) MOZ_OVERRIDE; michael@0: virtual bool RecvPDNSRequestConstructor(PDNSRequestParent* actor, michael@0: const nsCString& hostName, michael@0: const uint32_t& flags) MOZ_OVERRIDE; michael@0: virtual bool DeallocPDNSRequestParent(PDNSRequestParent*) MOZ_OVERRIDE; michael@0: virtual bool RecvHTMLDNSPrefetch(const nsString& hostname, michael@0: const uint16_t& flags) MOZ_OVERRIDE; michael@0: virtual bool RecvCancelHTMLDNSPrefetch(const nsString& hostname, michael@0: const uint16_t& flags, michael@0: const nsresult& reason) MOZ_OVERRIDE; michael@0: michael@0: virtual mozilla::ipc::IProtocol* michael@0: CloneProtocol(Channel* aChannel, michael@0: mozilla::ipc::ProtocolCloneContext* aCtx) MOZ_OVERRIDE; michael@0: virtual PRtspControllerParent* AllocPRtspControllerParent() MOZ_OVERRIDE; michael@0: virtual bool DeallocPRtspControllerParent(PRtspControllerParent*) MOZ_OVERRIDE; michael@0: michael@0: virtual PRtspChannelParent* michael@0: AllocPRtspChannelParent(const RtspChannelConnectArgs& aArgs) michael@0: MOZ_OVERRIDE; michael@0: virtual bool michael@0: RecvPRtspChannelConstructor(PRtspChannelParent* aActor, michael@0: const RtspChannelConnectArgs& aArgs) michael@0: MOZ_OVERRIDE; michael@0: virtual bool DeallocPRtspChannelParent(PRtspChannelParent*) MOZ_OVERRIDE; michael@0: michael@0: virtual PChannelDiverterParent* michael@0: AllocPChannelDiverterParent(const ChannelDiverterArgs& channel) MOZ_OVERRIDE; michael@0: virtual bool michael@0: RecvPChannelDiverterConstructor(PChannelDiverterParent* actor, michael@0: const ChannelDiverterArgs& channel) MOZ_OVERRIDE; michael@0: virtual bool DeallocPChannelDiverterParent(PChannelDiverterParent* actor) michael@0: MOZ_OVERRIDE; michael@0: michael@0: private: michael@0: nsCString mCoreAppsBasePath; michael@0: nsCString mWebAppsBasePath; michael@0: }; michael@0: michael@0: } // namespace net michael@0: } // namespace mozilla michael@0: michael@0: #endif // mozilla_net_NeckoParent_h