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 {
|
2019-02-06 18:57:37 +03:00
|
|
|
friend class PNeckoChild;
|
|
|
|
|
2009-08-18 23:05:15 +04:00
|
|
|
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:
|
2019-02-06 18:58:07 +03:00
|
|
|
PStunAddrsRequestChild* AllocPStunAddrsRequestChild();
|
|
|
|
bool DeallocPStunAddrsRequestChild(PStunAddrsRequestChild* aActor);
|
2017-03-22 03:59:05 +03:00
|
|
|
|
2019-09-17 21:17:37 +03:00
|
|
|
PWebrtcTCPSocketChild* AllocPWebrtcTCPSocketChild(const Maybe<TabId>& tabId);
|
2019-09-17 21:15:41 +03:00
|
|
|
bool DeallocPWebrtcTCPSocketChild(PWebrtcTCPSocketChild* aActor);
|
2018-06-05 20:10:16 +03:00
|
|
|
|
2019-02-06 18:58:07 +03:00
|
|
|
PAltDataOutputStreamChild* AllocPAltDataOutputStreamChild(
|
2018-04-25 07:01:00 +03:00
|
|
|
const nsCString& type, const int64_t& predictedSize,
|
2019-02-06 18:58:07 +03:00
|
|
|
PHttpChannelChild* channel);
|
|
|
|
bool DeallocPAltDataOutputStreamChild(PAltDataOutputStreamChild* aActor);
|
|
|
|
|
2019-08-07 08:54:53 +03:00
|
|
|
already_AddRefed<PDocumentChannelChild> AllocPDocumentChannelChild(
|
|
|
|
const PBrowserOrId& aBrowser, const SerializedLoadContext& aSerialized,
|
|
|
|
const DocumentChannelCreationArgs& args);
|
|
|
|
|
2019-02-06 18:58:07 +03:00
|
|
|
PCookieServiceChild* AllocPCookieServiceChild();
|
|
|
|
bool DeallocPCookieServiceChild(PCookieServiceChild*);
|
|
|
|
PFTPChannelChild* AllocPFTPChannelChild(
|
2013-07-08 19:48:39 +04:00
|
|
|
const PBrowserOrId& aBrowser, const SerializedLoadContext& aSerialized,
|
2019-02-06 18:58:07 +03:00
|
|
|
const FTPChannelCreationArgs& aOpenArgs);
|
|
|
|
bool DeallocPFTPChannelChild(PFTPChannelChild*);
|
|
|
|
PWebSocketChild* AllocPWebSocketChild(const PBrowserOrId&,
|
|
|
|
const SerializedLoadContext&,
|
|
|
|
const uint32_t&);
|
|
|
|
bool DeallocPWebSocketChild(PWebSocketChild*);
|
|
|
|
PTCPSocketChild* AllocPTCPSocketChild(const nsString& host,
|
|
|
|
const uint16_t& port);
|
|
|
|
bool DeallocPTCPSocketChild(PTCPSocketChild*);
|
|
|
|
PTCPServerSocketChild* AllocPTCPServerSocketChild(
|
2014-01-17 23:49:39 +04:00
|
|
|
const uint16_t& aLocalPort, const uint16_t& aBacklog,
|
2019-02-06 18:58:07 +03:00
|
|
|
const bool& aUseArrayBuffers);
|
|
|
|
bool DeallocPTCPServerSocketChild(PTCPServerSocketChild*);
|
2019-04-25 17:18:11 +03:00
|
|
|
PUDPSocketChild* AllocPUDPSocketChild(nsIPrincipal* aPrincipal,
|
2019-02-06 18:58:07 +03:00
|
|
|
const nsCString& aFilter);
|
|
|
|
bool DeallocPUDPSocketChild(PUDPSocketChild*);
|
|
|
|
PDNSRequestChild* AllocPDNSRequestChild(
|
2017-02-14 07:25:35 +03:00
|
|
|
const nsCString& aHost, const OriginAttributes& aOriginAttributes,
|
2019-02-06 18:58:07 +03:00
|
|
|
const uint32_t& aFlags);
|
|
|
|
bool DeallocPDNSRequestChild(PDNSRequestChild*);
|
|
|
|
PSimpleChannelChild* AllocPSimpleChannelChild(const uint32_t& channelId);
|
|
|
|
bool DeallocPSimpleChannelChild(PSimpleChannelChild* child);
|
|
|
|
PChannelDiverterChild* AllocPChannelDiverterChild(
|
|
|
|
const ChannelDiverterArgs& channel);
|
|
|
|
bool DeallocPChannelDiverterChild(PChannelDiverterChild* actor);
|
|
|
|
PTransportProviderChild* AllocPTransportProviderChild();
|
|
|
|
bool DeallocPTransportProviderChild(PTransportProviderChild* aActor);
|
2019-02-06 18:58:43 +03:00
|
|
|
mozilla::ipc::IPCResult RecvAsyncAuthPromptForNestedFrame(
|
2016-11-15 06:26:00 +03:00
|
|
|
const TabId& aNestedFrameId, const nsCString& aUri,
|
2019-02-06 18:58:43 +03:00
|
|
|
const nsString& aRealm, const uint64_t& aCallbackId);
|
2019-02-06 18:58:07 +03:00
|
|
|
PWebSocketEventListenerChild* AllocPWebSocketEventListenerChild(
|
|
|
|
const uint64_t& aInnerWindowID);
|
|
|
|
bool DeallocPWebSocketEventListenerChild(PWebSocketEventListenerChild*);
|
2015-06-18 12:23:00 +03:00
|
|
|
|
|
|
|
/* Predictor Messsages */
|
2019-02-06 18:58:43 +03:00
|
|
|
mozilla::ipc::IPCResult RecvPredOnPredictPrefetch(
|
|
|
|
const URIParams& aURI, const uint32_t& aHttpStatus);
|
|
|
|
mozilla::ipc::IPCResult RecvPredOnPredictPreconnect(const URIParams& aURI);
|
|
|
|
mozilla::ipc::IPCResult RecvPredOnPredictDNS(const URIParams& aURI);
|
|
|
|
|
|
|
|
mozilla::ipc::IPCResult RecvSpeculativeConnectRequest();
|
|
|
|
mozilla::ipc::IPCResult RecvNetworkChangeNotification(nsCString const& type);
|
2018-09-04 23:45:22 +03:00
|
|
|
|
2019-03-15 21:55:10 +03:00
|
|
|
PClassifierDummyChannelChild* AllocPClassifierDummyChannelChild(
|
2019-08-19 22:38:50 +03:00
|
|
|
nsIURI* aURI, nsIURI* aTopWindowURI,
|
|
|
|
nsIPrincipal* aContentBlockingAllowListPrincipal,
|
|
|
|
const nsresult& aTopWindowURIResult,
|
2019-03-04 09:30:00 +03:00
|
|
|
const Maybe<LoadInfoArgs>& aLoadInfo);
|
2018-11-30 13:46:48 +03:00
|
|
|
|
2019-03-15 21:55:10 +03:00
|
|
|
bool DeallocPClassifierDummyChannelChild(
|
|
|
|
PClassifierDummyChannelChild* aChannel);
|
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
|