2009-08-18 19:05:15 +00: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 11:12:37 +00: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 19:05:15 +00: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 18:55:33 +00:00
|
|
|
#include "mozilla/net/NeckoCommon.h"
|
2009-08-18 19:05:15 +00:00
|
|
|
|
|
|
|
namespace mozilla {
|
|
|
|
namespace net {
|
|
|
|
|
|
|
|
// Header file contents
|
|
|
|
class NeckoChild : public PNeckoChild {
|
2019-02-06 15:57:37 +00:00
|
|
|
friend class PNeckoChild;
|
|
|
|
|
2009-08-18 19:05:15 +00:00
|
|
|
public:
|
2018-04-30 16:46:04 +00:00
|
|
|
NeckoChild() = default;
|
2009-08-18 19:05:15 +00:00
|
|
|
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 18:55:33 +00:00
|
|
|
protected:
|
2018-11-28 20:40:35 +00:00
|
|
|
virtual PHttpChannelChild* AllocPHttpChannelChild(
|
|
|
|
const PBrowserOrId&, const SerializedLoadContext&,
|
|
|
|
const HttpChannelCreationArgs& aOpenArgs) override;
|
2015-03-21 16:28:04 +00:00
|
|
|
virtual bool DeallocPHttpChannelChild(PHttpChannelChild*) override;
|
2016-04-11 03:17:02 +00:00
|
|
|
|
2017-03-22 00:59:05 +00:00
|
|
|
virtual PStunAddrsRequestChild* AllocPStunAddrsRequestChild() override;
|
|
|
|
virtual bool DeallocPStunAddrsRequestChild(
|
|
|
|
PStunAddrsRequestChild* aActor) override;
|
|
|
|
|
2018-06-05 17:10:16 +00:00
|
|
|
virtual PWebrtcProxyChannelChild* AllocPWebrtcProxyChannelChild(
|
|
|
|
const PBrowserOrId& browser) override;
|
|
|
|
virtual bool DeallocPWebrtcProxyChannelChild(
|
|
|
|
PWebrtcProxyChannelChild* aActor) override;
|
|
|
|
|
2018-04-25 04:01:00 +00:00
|
|
|
virtual PAltDataOutputStreamChild* AllocPAltDataOutputStreamChild(
|
|
|
|
const nsCString& type, const int64_t& predictedSize,
|
|
|
|
PHttpChannelChild* channel) override;
|
2016-04-11 03:17:02 +00:00
|
|
|
virtual bool DeallocPAltDataOutputStreamChild(
|
|
|
|
PAltDataOutputStreamChild* aActor) override;
|
|
|
|
|
2015-03-21 16:28:04 +00:00
|
|
|
virtual PCookieServiceChild* AllocPCookieServiceChild() override;
|
|
|
|
virtual bool DeallocPCookieServiceChild(PCookieServiceChild*) override;
|
|
|
|
virtual PWyciwygChannelChild* AllocPWyciwygChannelChild() override;
|
|
|
|
virtual bool DeallocPWyciwygChannelChild(PWyciwygChannelChild*) override;
|
2013-06-22 16:09:19 +00:00
|
|
|
virtual PFTPChannelChild* AllocPFTPChannelChild(
|
2013-07-08 15:48:39 +00:00
|
|
|
const PBrowserOrId& aBrowser, const SerializedLoadContext& aSerialized,
|
2015-03-21 16:28:04 +00:00
|
|
|
const FTPChannelCreationArgs& aOpenArgs) override;
|
|
|
|
virtual bool DeallocPFTPChannelChild(PFTPChannelChild*) override;
|
2014-06-11 05:44:36 +00:00
|
|
|
virtual PWebSocketChild* AllocPWebSocketChild(const PBrowserOrId&,
|
2015-10-28 19:10:42 +00:00
|
|
|
const SerializedLoadContext&,
|
|
|
|
const uint32_t&) override;
|
2015-03-21 16:28:04 +00:00
|
|
|
virtual bool DeallocPWebSocketChild(PWebSocketChild*) override;
|
2013-12-19 03:21:12 +00:00
|
|
|
virtual PTCPSocketChild* AllocPTCPSocketChild(const nsString& host,
|
2015-03-21 16:28:04 +00:00
|
|
|
const uint16_t& port) override;
|
|
|
|
virtual bool DeallocPTCPSocketChild(PTCPSocketChild*) override;
|
2014-01-17 19:49:39 +00:00
|
|
|
virtual PTCPServerSocketChild* AllocPTCPServerSocketChild(
|
|
|
|
const uint16_t& aLocalPort, const uint16_t& aBacklog,
|
2015-03-25 14:36:56 +00:00
|
|
|
const bool& aUseArrayBuffers) override;
|
2015-03-21 16:28:04 +00:00
|
|
|
virtual bool DeallocPTCPServerSocketChild(PTCPServerSocketChild*) override;
|
2015-04-08 19:35:00 +00:00
|
|
|
virtual PUDPSocketChild* AllocPUDPSocketChild(
|
|
|
|
const Principal& aPrincipal, const nsCString& aFilter) override;
|
2015-03-21 16:28:04 +00:00
|
|
|
virtual bool DeallocPUDPSocketChild(PUDPSocketChild*) override;
|
2013-12-11 19:03:51 +00:00
|
|
|
virtual PDNSRequestChild* AllocPDNSRequestChild(
|
2017-02-14 04:25:35 +00:00
|
|
|
const nsCString& aHost, const OriginAttributes& aOriginAttributes,
|
2018-05-16 20:05:03 +00:00
|
|
|
const uint32_t& aFlags) override;
|
2015-03-21 16:28:04 +00:00
|
|
|
virtual bool DeallocPDNSRequestChild(PDNSRequestChild*) override;
|
2015-03-27 20:12:37 +00:00
|
|
|
virtual PDataChannelChild* AllocPDataChannelChild(
|
|
|
|
const uint32_t& channelId) override;
|
|
|
|
virtual bool DeallocPDataChannelChild(PDataChannelChild* child) override;
|
2017-04-12 18:43:50 +00:00
|
|
|
virtual PFileChannelChild* AllocPFileChannelChild(
|
|
|
|
const uint32_t& channelId) override;
|
|
|
|
virtual bool DeallocPFileChannelChild(PFileChannelChild* child) override;
|
2017-07-27 20:34:54 +00:00
|
|
|
virtual PSimpleChannelChild* AllocPSimpleChannelChild(
|
|
|
|
const uint32_t& channelId) override;
|
|
|
|
virtual bool DeallocPSimpleChannelChild(PSimpleChannelChild* child) override;
|
2014-03-10 22:04:28 +00:00
|
|
|
virtual PChannelDiverterChild* AllocPChannelDiverterChild(
|
2015-03-21 16:28:04 +00:00
|
|
|
const ChannelDiverterArgs& channel) override;
|
|
|
|
virtual bool DeallocPChannelDiverterChild(
|
|
|
|
PChannelDiverterChild* actor) override;
|
2016-06-07 09:46:03 +00:00
|
|
|
virtual PTransportProviderChild* AllocPTransportProviderChild() override;
|
|
|
|
virtual bool DeallocPTransportProviderChild(
|
|
|
|
PTransportProviderChild* aActor) override;
|
2016-11-15 03:26:00 +00:00
|
|
|
virtual mozilla::ipc::IPCResult RecvAsyncAuthPromptForNestedFrame(
|
|
|
|
const TabId& aNestedFrameId, const nsCString& aUri,
|
|
|
|
const nsString& aRealm, const uint64_t& aCallbackId) override;
|
2015-10-28 19:10:20 +00:00
|
|
|
virtual PWebSocketEventListenerChild* AllocPWebSocketEventListenerChild(
|
|
|
|
const uint64_t& aInnerWindowID) override;
|
|
|
|
virtual bool DeallocPWebSocketEventListenerChild(
|
|
|
|
PWebSocketEventListenerChild*) override;
|
2015-06-18 09:23:00 +00:00
|
|
|
|
|
|
|
/* Predictor Messsages */
|
2016-11-15 03:26:00 +00:00
|
|
|
virtual mozilla::ipc::IPCResult RecvPredOnPredictPrefetch(
|
|
|
|
const URIParams& aURI, const uint32_t& aHttpStatus) override;
|
|
|
|
virtual mozilla::ipc::IPCResult RecvPredOnPredictPreconnect(
|
|
|
|
const URIParams& aURI) override;
|
|
|
|
virtual mozilla::ipc::IPCResult RecvPredOnPredictDNS(
|
|
|
|
const URIParams& aURI) override;
|
2016-03-28 23:43:01 +00:00
|
|
|
|
2016-11-15 03:26:00 +00:00
|
|
|
virtual mozilla::ipc::IPCResult RecvSpeculativeConnectRequest() override;
|
2018-05-30 14:36:42 +00:00
|
|
|
virtual mozilla::ipc::IPCResult RecvNetworkChangeNotification(
|
|
|
|
nsCString const& type) override;
|
2018-09-04 20:45:22 +00:00
|
|
|
|
2018-10-12 09:40:36 +00:00
|
|
|
virtual PTrackingDummyChannelChild* AllocPTrackingDummyChannelChild(
|
2018-10-25 08:44:12 +00:00
|
|
|
nsIURI* aURI, nsIURI* aTopWindowURI, const nsresult& aTopWindowURIResult,
|
2018-10-12 09:40:36 +00:00
|
|
|
const OptionalLoadInfoArgs& aLoadInfo) override;
|
2018-11-30 10:46:48 +00:00
|
|
|
|
2018-10-12 09:40:36 +00:00
|
|
|
virtual bool DeallocPTrackingDummyChannelChild(
|
|
|
|
PTrackingDummyChannelChild* aChannel) override;
|
2009-08-18 19:05:15 +00: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
|