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:
|
2018-04-30 19:46:04 +03:00
|
|
|
NeckoChild() = default;
|
2009-08-18 23:05:15 +04: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 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;
|
2016-04-11 06:17:02 +03:00
|
|
|
|
2017-03-22 03:59:05 +03:00
|
|
|
virtual PStunAddrsRequestChild* AllocPStunAddrsRequestChild() override;
|
|
|
|
virtual bool
|
|
|
|
DeallocPStunAddrsRequestChild(PStunAddrsRequestChild* aActor) override;
|
|
|
|
|
2018-04-25 07:01:00 +03:00
|
|
|
virtual PAltDataOutputStreamChild* AllocPAltDataOutputStreamChild(const nsCString& type, const int64_t& predictedSize, PHttpChannelChild* channel) override;
|
2016-04-11 06:17:02 +03:00
|
|
|
virtual bool DeallocPAltDataOutputStreamChild(PAltDataOutputStreamChild* aActor) override;
|
|
|
|
|
2015-03-21 19:28:04 +03:00
|
|
|
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-10-28 22:10:42 +03:00
|
|
|
const SerializedLoadContext&,
|
|
|
|
const uint32_t&) 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-25 17:36:56 +03:00
|
|
|
const bool& aUseArrayBuffers) override;
|
2015-03-21 19:28:04 +03:00
|
|
|
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,
|
2017-02-14 07:25:35 +03:00
|
|
|
const OriginAttributes& aOriginAttributes,
|
2018-05-16 23:05:03 +03:00
|
|
|
const uint32_t& aFlags) override;
|
2015-03-21 19:28:04 +03:00
|
|
|
virtual bool DeallocPDNSRequestChild(PDNSRequestChild*) override;
|
2015-03-27 23:12:37 +03:00
|
|
|
virtual PDataChannelChild* AllocPDataChannelChild(const uint32_t& channelId) override;
|
|
|
|
virtual bool DeallocPDataChannelChild(PDataChannelChild* child) override;
|
2017-04-12 21:43:50 +03:00
|
|
|
virtual PFileChannelChild* AllocPFileChannelChild(const uint32_t& channelId) override;
|
|
|
|
virtual bool DeallocPFileChannelChild(PFileChannelChild* child) override;
|
2017-07-27 23:34:54 +03:00
|
|
|
virtual PSimpleChannelChild* AllocPSimpleChannelChild(const uint32_t& channelId) override;
|
|
|
|
virtual bool DeallocPSimpleChannelChild(PSimpleChannelChild* child) 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;
|
2016-06-07 12:46:03 +03:00
|
|
|
virtual PTransportProviderChild*
|
|
|
|
AllocPTransportProviderChild() override;
|
|
|
|
virtual bool
|
|
|
|
DeallocPTransportProviderChild(PTransportProviderChild* aActor) override;
|
2016-11-15 06:26:00 +03:00
|
|
|
virtual mozilla::ipc::IPCResult RecvAsyncAuthPromptForNestedFrame(const TabId& aNestedFrameId,
|
|
|
|
const nsCString& aUri,
|
|
|
|
const nsString& aRealm,
|
|
|
|
const uint64_t& aCallbackId) override;
|
2015-10-28 22:10:20 +03:00
|
|
|
virtual PWebSocketEventListenerChild*
|
|
|
|
AllocPWebSocketEventListenerChild(const uint64_t& aInnerWindowID) override;
|
|
|
|
virtual bool DeallocPWebSocketEventListenerChild(PWebSocketEventListenerChild*) override;
|
2015-06-18 12:23:00 +03:00
|
|
|
|
|
|
|
/* Predictor Messsages */
|
2016-11-15 06:26:00 +03: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-29 02:43:01 +03:00
|
|
|
|
2016-11-15 06:26:00 +03:00
|
|
|
virtual mozilla::ipc::IPCResult RecvSpeculativeConnectRequest() override;
|
2018-05-30 17:36:42 +03:00
|
|
|
virtual mozilla::ipc::IPCResult RecvNetworkChangeNotification(nsCString const& type) override;
|
2018-09-04 23:45:22 +03:00
|
|
|
|
|
|
|
virtual mozilla::ipc::IPCResult RecvCrossProcessRedirect(
|
|
|
|
const uint32_t& aRegistrarId,
|
|
|
|
nsIURI* aURI,
|
|
|
|
const uint32_t& aNewLoadFlags,
|
|
|
|
const OptionalLoadInfoArgs& aLoadInfoForwarder,
|
|
|
|
const uint64_t& aChannelId,
|
|
|
|
nsIURI* aOriginalURI,
|
|
|
|
const uint64_t& aIdentifier) override;
|
2018-10-12 12:40:36 +03:00
|
|
|
|
|
|
|
virtual PTrackingDummyChannelChild*
|
|
|
|
AllocPTrackingDummyChannelChild(nsIURI* aURI,
|
2018-10-25 11:44:12 +03:00
|
|
|
nsIURI* aTopWindowURI,
|
|
|
|
const nsresult& aTopWindowURIResult,
|
2018-10-12 12:40:36 +03:00
|
|
|
const OptionalLoadInfoArgs& aLoadInfo) override;
|
|
|
|
|
|
|
|
virtual bool
|
|
|
|
DeallocPTrackingDummyChannelChild(PTrackingDummyChannelChild* aChannel) 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
|