2009-08-18 12:05:15 -07: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 04:12:37 -07: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 12:05:15 -07: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 11:55:33 -07:00
|
|
|
#include "mozilla/net/NeckoCommon.h"
|
2009-08-18 12:05:15 -07: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 11:55:33 -07:00
|
|
|
static void DestroyNeckoChild();
|
2009-08-18 12:05:15 -07: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 11:55:33 -07:00
|
|
|
protected:
|
2013-06-22 09:09:19 -07:00
|
|
|
virtual PHttpChannelChild*
|
2014-06-10 22:44:36 -07:00
|
|
|
AllocPHttpChannelChild(const PBrowserOrId&, const SerializedLoadContext&,
|
2015-03-21 09:28:04 -07: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 09:09:19 -07:00
|
|
|
virtual PFTPChannelChild*
|
2014-06-10 22:44:36 -07:00
|
|
|
AllocPFTPChannelChild(const PBrowserOrId& aBrowser,
|
2013-07-08 08:48:39 -07:00
|
|
|
const SerializedLoadContext& aSerialized,
|
2015-03-21 09:28:04 -07:00
|
|
|
const FTPChannelCreationArgs& aOpenArgs) override;
|
|
|
|
virtual bool DeallocPFTPChannelChild(PFTPChannelChild*) override;
|
2014-01-17 11:49:39 -08:00
|
|
|
virtual PWebSocketChild*
|
2014-06-10 22:44:36 -07:00
|
|
|
AllocPWebSocketChild(const PBrowserOrId&,
|
2015-03-21 09:28:04 -07:00
|
|
|
const SerializedLoadContext&) override;
|
|
|
|
virtual bool DeallocPWebSocketChild(PWebSocketChild*) override;
|
2013-12-18 19:21:12 -08:00
|
|
|
virtual PTCPSocketChild* AllocPTCPSocketChild(const nsString& host,
|
2015-03-21 09:28:04 -07:00
|
|
|
const uint16_t& port) override;
|
|
|
|
virtual bool DeallocPTCPSocketChild(PTCPSocketChild*) override;
|
2014-01-17 11:49:39 -08:00
|
|
|
virtual PTCPServerSocketChild*
|
|
|
|
AllocPTCPServerSocketChild(const uint16_t& aLocalPort,
|
|
|
|
const uint16_t& aBacklog,
|
2015-03-21 09:28:04 -07:00
|
|
|
const nsString& aBinaryType) override;
|
|
|
|
virtual bool DeallocPTCPServerSocketChild(PTCPServerSocketChild*) override;
|
|
|
|
virtual PUDPSocketChild* AllocPUDPSocketChild(const nsCString& aFilter) override;
|
|
|
|
virtual bool DeallocPUDPSocketChild(PUDPSocketChild*) override;
|
2013-12-11 11:03:51 -08:00
|
|
|
virtual PDNSRequestChild* AllocPDNSRequestChild(const nsCString& aHost,
|
2015-02-18 21:14:00 -08:00
|
|
|
const uint32_t& aFlags,
|
2015-03-21 09:28:04 -07:00
|
|
|
const nsCString& aNetworkInterface) override;
|
|
|
|
virtual bool DeallocPDNSRequestChild(PDNSRequestChild*) override;
|
2014-01-17 11:49:39 -08:00
|
|
|
virtual PRemoteOpenFileChild*
|
2014-05-30 12:50:51 -07:00
|
|
|
AllocPRemoteOpenFileChild(const SerializedLoadContext& aSerialized,
|
|
|
|
const URIParams&,
|
2015-03-21 09:28:04 -07:00
|
|
|
const OptionalURIParams&) override;
|
|
|
|
virtual bool DeallocPRemoteOpenFileChild(PRemoteOpenFileChild*) override;
|
2015-03-27 13:12:37 -07:00
|
|
|
virtual PDataChannelChild* AllocPDataChannelChild(const uint32_t& channelId) override;
|
|
|
|
virtual bool DeallocPDataChannelChild(PDataChannelChild* child) override;
|
2015-03-21 09:28:04 -07:00
|
|
|
virtual PRtspControllerChild* AllocPRtspControllerChild() override;
|
|
|
|
virtual bool DeallocPRtspControllerChild(PRtspControllerChild*) override;
|
2014-04-03 04:08:34 -07:00
|
|
|
virtual PRtspChannelChild*
|
|
|
|
AllocPRtspChannelChild(const RtspChannelConnectArgs& aArgs)
|
2015-03-21 09:28:04 -07:00
|
|
|
override;
|
|
|
|
virtual bool DeallocPRtspChannelChild(PRtspChannelChild*) override;
|
2014-03-10 15:04:28 -07:00
|
|
|
virtual PChannelDiverterChild*
|
2015-03-21 09:28:04 -07:00
|
|
|
AllocPChannelDiverterChild(const ChannelDiverterArgs& channel) override;
|
2014-03-10 15:04:28 -07:00
|
|
|
virtual bool
|
2015-03-21 09:28:04 -07:00
|
|
|
DeallocPChannelDiverterChild(PChannelDiverterChild* actor) override;
|
2014-10-23 17:29:00 -07:00
|
|
|
virtual bool RecvAsyncAuthPromptForNestedFrame(const TabId& aNestedFrameId,
|
2014-06-10 22:44:36 -07:00
|
|
|
const nsCString& aUri,
|
|
|
|
const nsString& aRealm,
|
2015-03-21 09:28:04 -07:00
|
|
|
const uint64_t& aCallbackId) override;
|
|
|
|
virtual bool RecvAppOfflineStatus(const uint32_t& aId, const bool& aOffline) override;
|
2009-08-18 12:05:15 -07: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
|