2009-08-18 23:05:15 +04:00
|
|
|
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
|
|
/* vim: set sw=2 ts=8 et tw=80 : */
|
|
|
|
|
2012-05-21 15:12:37 +04:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
2009-08-18 23:05:15 +04:00
|
|
|
|
|
|
|
#ifndef mozilla_net_NeckoChild_h
|
|
|
|
#define mozilla_net_NeckoChild_h
|
|
|
|
|
|
|
|
#include "mozilla/net/PNeckoChild.h"
|
Bug 530952: Electrolysis HTTP Channel implementation. author=jduell, r=bsmedberg, sr=bz
- Supports only primitive xpcshell HTTP requests which don't set/get HTTP
headers, don't do redirects, observers, load groups, or anything else other
than basic things like looking at the reply body, Content-type, Content-length, etc.
- Tested with network/test/unit_ipc/test_simple_wrap.js (patch @ bug 521922)
- Only used if "NECKO_E10S_HTTP" set in environment.
- Force http.h to get #included before any IPDL files, to centralize #define
handling of LOG and to make sure FORCE_PR_LOGGING is set if needed (bug
545995)
2009-09-22 22:55:33 +04:00
|
|
|
#include "mozilla/net/NeckoCommon.h"
|
2009-08-18 23:05:15 +04:00
|
|
|
|
|
|
|
namespace mozilla {
|
|
|
|
namespace net {
|
|
|
|
|
|
|
|
// Header file contents
|
|
|
|
class NeckoChild :
|
|
|
|
public PNeckoChild
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
NeckoChild();
|
|
|
|
virtual ~NeckoChild();
|
|
|
|
|
|
|
|
static void InitNeckoChild();
|
Bug 530952: Electrolysis HTTP Channel implementation. author=jduell, r=bsmedberg, sr=bz
- Supports only primitive xpcshell HTTP requests which don't set/get HTTP
headers, don't do redirects, observers, load groups, or anything else other
than basic things like looking at the reply body, Content-type, Content-length, etc.
- Tested with network/test/unit_ipc/test_simple_wrap.js (patch @ bug 521922)
- Only used if "NECKO_E10S_HTTP" set in environment.
- Force http.h to get #included before any IPDL files, to centralize #define
handling of LOG and to make sure FORCE_PR_LOGGING is set if needed (bug
545995)
2009-09-22 22:55:33 +04:00
|
|
|
static void DestroyNeckoChild();
|
2009-08-18 23:05:15 +04:00
|
|
|
|
Bug 530952: Electrolysis HTTP Channel implementation. author=jduell, r=bsmedberg, sr=bz
- Supports only primitive xpcshell HTTP requests which don't set/get HTTP
headers, don't do redirects, observers, load groups, or anything else other
than basic things like looking at the reply body, Content-type, Content-length, etc.
- Tested with network/test/unit_ipc/test_simple_wrap.js (patch @ bug 521922)
- Only used if "NECKO_E10S_HTTP" set in environment.
- Force http.h to get #included before any IPDL files, to centralize #define
handling of LOG and to make sure FORCE_PR_LOGGING is set if needed (bug
545995)
2009-09-22 22:55:33 +04:00
|
|
|
protected:
|
2013-06-22 20:09:19 +04:00
|
|
|
virtual PHttpChannelChild*
|
2014-06-11 09:44:36 +04:00
|
|
|
AllocPHttpChannelChild(const PBrowserOrId&, const SerializedLoadContext&,
|
2015-03-21 19:28:04 +03:00
|
|
|
const HttpChannelCreationArgs& aOpenArgs) override;
|
|
|
|
virtual bool DeallocPHttpChannelChild(PHttpChannelChild*) override;
|
|
|
|
virtual PCookieServiceChild* AllocPCookieServiceChild() override;
|
|
|
|
virtual bool DeallocPCookieServiceChild(PCookieServiceChild*) override;
|
|
|
|
virtual PWyciwygChannelChild* AllocPWyciwygChannelChild() override;
|
|
|
|
virtual bool DeallocPWyciwygChannelChild(PWyciwygChannelChild*) override;
|
2013-06-22 20:09:19 +04:00
|
|
|
virtual PFTPChannelChild*
|
2014-06-11 09:44:36 +04:00
|
|
|
AllocPFTPChannelChild(const PBrowserOrId& aBrowser,
|
2013-07-08 19:48:39 +04:00
|
|
|
const SerializedLoadContext& aSerialized,
|
2015-03-21 19:28:04 +03:00
|
|
|
const FTPChannelCreationArgs& aOpenArgs) override;
|
|
|
|
virtual bool DeallocPFTPChannelChild(PFTPChannelChild*) override;
|
2014-01-17 23:49:39 +04:00
|
|
|
virtual PWebSocketChild*
|
2014-06-11 09:44:36 +04:00
|
|
|
AllocPWebSocketChild(const PBrowserOrId&,
|
2015-06-15 22:27:53 +03:00
|
|
|
const SerializedLoadContext&) override;
|
2015-03-21 19:28:04 +03:00
|
|
|
virtual bool DeallocPWebSocketChild(PWebSocketChild*) override;
|
2013-12-19 07:21:12 +04:00
|
|
|
virtual PTCPSocketChild* AllocPTCPSocketChild(const nsString& host,
|
2015-03-21 19:28:04 +03:00
|
|
|
const uint16_t& port) override;
|
|
|
|
virtual bool DeallocPTCPSocketChild(PTCPSocketChild*) override;
|
2014-01-17 23:49:39 +04:00
|
|
|
virtual PTCPServerSocketChild*
|
|
|
|
AllocPTCPServerSocketChild(const uint16_t& aLocalPort,
|
|
|
|
const uint16_t& aBacklog,
|
2015-03-21 19:28:04 +03:00
|
|
|
const nsString& aBinaryType) override;
|
|
|
|
virtual bool DeallocPTCPServerSocketChild(PTCPServerSocketChild*) override;
|
2015-04-08 22:35:00 +03:00
|
|
|
virtual PUDPSocketChild* AllocPUDPSocketChild(const Principal& aPrincipal,
|
|
|
|
const nsCString& aFilter) override;
|
2015-03-21 19:28:04 +03:00
|
|
|
virtual bool DeallocPUDPSocketChild(PUDPSocketChild*) override;
|
2013-12-11 23:03:51 +04:00
|
|
|
virtual PDNSRequestChild* AllocPDNSRequestChild(const nsCString& aHost,
|
2015-02-19 08:14:00 +03:00
|
|
|
const uint32_t& aFlags,
|
2015-03-21 19:28:04 +03:00
|
|
|
const nsCString& aNetworkInterface) override;
|
|
|
|
virtual bool DeallocPDNSRequestChild(PDNSRequestChild*) override;
|
2014-01-17 23:49:39 +04:00
|
|
|
virtual PRemoteOpenFileChild*
|
2014-05-30 23:50:51 +04:00
|
|
|
AllocPRemoteOpenFileChild(const SerializedLoadContext& aSerialized,
|
|
|
|
const URIParams&,
|
2015-03-21 19:28:04 +03:00
|
|
|
const OptionalURIParams&) override;
|
|
|
|
virtual bool DeallocPRemoteOpenFileChild(PRemoteOpenFileChild*) override;
|
2015-03-27 23:12:37 +03:00
|
|
|
virtual PDataChannelChild* AllocPDataChannelChild(const uint32_t& channelId) override;
|
|
|
|
virtual bool DeallocPDataChannelChild(PDataChannelChild* child) override;
|
2015-03-21 19:28:04 +03:00
|
|
|
virtual PRtspControllerChild* AllocPRtspControllerChild() override;
|
|
|
|
virtual bool DeallocPRtspControllerChild(PRtspControllerChild*) override;
|
2014-04-03 15:08:34 +04:00
|
|
|
virtual PRtspChannelChild*
|
|
|
|
AllocPRtspChannelChild(const RtspChannelConnectArgs& aArgs)
|
2015-03-21 19:28:04 +03:00
|
|
|
override;
|
|
|
|
virtual bool DeallocPRtspChannelChild(PRtspChannelChild*) override;
|
2014-03-11 02:04:28 +04:00
|
|
|
virtual PChannelDiverterChild*
|
2015-03-21 19:28:04 +03:00
|
|
|
AllocPChannelDiverterChild(const ChannelDiverterArgs& channel) override;
|
2014-03-11 02:04:28 +04:00
|
|
|
virtual bool
|
2015-03-21 19:28:04 +03:00
|
|
|
DeallocPChannelDiverterChild(PChannelDiverterChild* actor) override;
|
2014-10-24 04:29:00 +04:00
|
|
|
virtual bool RecvAsyncAuthPromptForNestedFrame(const TabId& aNestedFrameId,
|
2014-06-11 09:44:36 +04:00
|
|
|
const nsCString& aUri,
|
|
|
|
const nsString& aRealm,
|
2015-03-21 19:28:04 +03:00
|
|
|
const uint64_t& aCallbackId) override;
|
|
|
|
virtual bool RecvAppOfflineStatus(const uint32_t& aId, const bool& aOffline) override;
|
2015-06-18 12:23:00 +03:00
|
|
|
|
|
|
|
/* Predictor Messsages */
|
|
|
|
virtual bool RecvPredOnPredictPreconnect(const URIParams& aURI) override;
|
|
|
|
virtual bool RecvPredOnPredictDNS(const URIParams& aURI) override;
|
2009-08-18 23:05:15 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Reference to the PNecko Child protocol.
|
|
|
|
* Null if this is not a content process.
|
|
|
|
*/
|
|
|
|
extern PNeckoChild *gNeckoChild;
|
|
|
|
|
|
|
|
} // namespace net
|
|
|
|
} // namespace mozilla
|
|
|
|
|
|
|
|
#endif // mozilla_net_NeckoChild_h
|