no bug - Bumping Firefox l10n changesets r=release a=l10n-bump DONTBUILD CLOSED TREE
[gecko.git] / netwerk / ipc / NeckoChild.h
blob2434c02126975483717f6b45d30e2d487d51b360
1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim: set sw=2 ts=8 et tw=80 : */
4 /* This Source Code Form is subject to the terms of the Mozilla Public
5 * License, v. 2.0. If a copy of the MPL was not distributed with this
6 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
8 #ifndef mozilla_net_NeckoChild_h
9 #define mozilla_net_NeckoChild_h
11 #include "mozilla/net/PNeckoChild.h"
12 #include "mozilla/net/NeckoCommon.h"
14 namespace mozilla {
15 namespace net {
17 // Header file contents
18 class NeckoChild : public PNeckoChild {
19 friend class PNeckoChild;
21 public:
22 NS_INLINE_DECL_THREADSAFE_REFCOUNTING(NeckoChild, override)
24 NeckoChild() = default;
26 static void InitNeckoChild();
28 protected:
29 virtual ~NeckoChild();
31 PStunAddrsRequestChild* AllocPStunAddrsRequestChild();
32 bool DeallocPStunAddrsRequestChild(PStunAddrsRequestChild* aActor);
34 PWebrtcTCPSocketChild* AllocPWebrtcTCPSocketChild(const Maybe<TabId>& tabId);
35 bool DeallocPWebrtcTCPSocketChild(PWebrtcTCPSocketChild* aActor);
37 PAltDataOutputStreamChild* AllocPAltDataOutputStreamChild(
38 const nsACString& type, const int64_t& predictedSize,
39 PHttpChannelChild* channel);
40 bool DeallocPAltDataOutputStreamChild(PAltDataOutputStreamChild* aActor);
42 PCookieServiceChild* AllocPCookieServiceChild();
43 bool DeallocPCookieServiceChild(PCookieServiceChild*);
44 #ifdef MOZ_WIDGET_GTK
45 PGIOChannelChild* AllocPGIOChannelChild(
46 PBrowserChild* aBrowser, const SerializedLoadContext& aSerialized,
47 const GIOChannelCreationArgs& aOpenArgs);
48 bool DeallocPGIOChannelChild(PGIOChannelChild*);
49 #endif
50 PWebSocketChild* AllocPWebSocketChild(PBrowserChild*,
51 const SerializedLoadContext&,
52 const uint32_t&);
53 bool DeallocPWebSocketChild(PWebSocketChild*);
54 PTCPSocketChild* AllocPTCPSocketChild(const nsAString& host,
55 const uint16_t& port);
56 bool DeallocPTCPSocketChild(PTCPSocketChild*);
57 PTCPServerSocketChild* AllocPTCPServerSocketChild(
58 const uint16_t& aLocalPort, const uint16_t& aBacklog,
59 const bool& aUseArrayBuffers);
60 bool DeallocPTCPServerSocketChild(PTCPServerSocketChild*);
61 PUDPSocketChild* AllocPUDPSocketChild(nsIPrincipal* aPrincipal,
62 const nsACString& aFilter);
63 bool DeallocPUDPSocketChild(PUDPSocketChild*);
64 PSimpleChannelChild* AllocPSimpleChannelChild(const uint32_t& channelId);
65 bool DeallocPSimpleChannelChild(PSimpleChannelChild* child);
66 PTransportProviderChild* AllocPTransportProviderChild();
67 bool DeallocPTransportProviderChild(PTransportProviderChild* aActor);
68 PWebSocketEventListenerChild* AllocPWebSocketEventListenerChild(
69 const uint64_t& aInnerWindowID);
70 bool DeallocPWebSocketEventListenerChild(PWebSocketEventListenerChild*);
72 /* Predictor Messsages */
73 mozilla::ipc::IPCResult RecvPredOnPredictPrefetch(
74 nsIURI* aURI, const uint32_t& aHttpStatus);
75 mozilla::ipc::IPCResult RecvPredOnPredictPreconnect(nsIURI* aURI);
76 mozilla::ipc::IPCResult RecvPredOnPredictDNS(nsIURI* aURI);
78 mozilla::ipc::IPCResult RecvSpeculativeConnectRequest();
79 mozilla::ipc::IPCResult RecvNetworkChangeNotification(nsCString const& type);
81 mozilla::ipc::IPCResult RecvSetTRRDomain(const nsCString& domain);
84 /**
85 * Reference to the PNecko Child protocol.
86 * Null if this is not a content process.
88 extern PNeckoChild* gNeckoChild;
90 } // namespace net
91 } // namespace mozilla
93 #endif // mozilla_net_NeckoChild_h