tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

NeckoChild.h (3479B)


      1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
      2 /* vim: set sw=2 ts=8 et tw=80 : */
      3 
      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/. */
      7 
      8 #ifndef mozilla_net_NeckoChild_h
      9 #define mozilla_net_NeckoChild_h
     10 
     11 #include "mozilla/net/PNeckoChild.h"
     12 #include "mozilla/net/NeckoCommon.h"
     13 
     14 namespace mozilla {
     15 namespace net {
     16 
     17 // Header file contents
     18 class NeckoChild : public PNeckoChild {
     19  friend class PNeckoChild;
     20 
     21 public:
     22  NS_INLINE_DECL_THREADSAFE_REFCOUNTING(NeckoChild, override)
     23 
     24  NeckoChild() = default;
     25 
     26  static void InitNeckoChild();
     27 
     28 protected:
     29  virtual ~NeckoChild();
     30 
     31  PStunAddrsRequestChild* AllocPStunAddrsRequestChild();
     32  bool DeallocPStunAddrsRequestChild(PStunAddrsRequestChild* aActor);
     33 
     34  PWebrtcTCPSocketChild* AllocPWebrtcTCPSocketChild(const Maybe<TabId>& tabId);
     35  bool DeallocPWebrtcTCPSocketChild(PWebrtcTCPSocketChild* aActor);
     36 
     37  PCacheEntryWriteHandleChild* AllocPCacheEntryWriteHandleChild(
     38      PHttpChannelChild* channel);
     39  bool DeallocPCacheEntryWriteHandleChild(PCacheEntryWriteHandleChild* aActor);
     40 
     41  PAltDataOutputStreamChild* AllocPAltDataOutputStreamChild(
     42      const nsACString& type, const int64_t& predictedSize,
     43      const mozilla::Maybe<mozilla::NotNull<PHttpChannelChild*>>& channel,
     44      const mozilla::Maybe<mozilla::NotNull<PCacheEntryWriteHandleChild*>>&
     45          handle);
     46  bool DeallocPAltDataOutputStreamChild(PAltDataOutputStreamChild* aActor);
     47 
     48  PCookieServiceChild* AllocPCookieServiceChild();
     49  bool DeallocPCookieServiceChild(PCookieServiceChild*);
     50 #ifdef MOZ_WIDGET_GTK
     51  PGIOChannelChild* AllocPGIOChannelChild(
     52      PBrowserChild* aBrowser, const SerializedLoadContext& aSerialized,
     53      const GIOChannelCreationArgs& aOpenArgs);
     54  bool DeallocPGIOChannelChild(PGIOChannelChild*);
     55 #endif
     56  PWebSocketChild* AllocPWebSocketChild(PBrowserChild*,
     57                                        const SerializedLoadContext&,
     58                                        const uint32_t&);
     59  bool DeallocPWebSocketChild(PWebSocketChild*);
     60  PTCPSocketChild* AllocPTCPSocketChild(const nsAString& host,
     61                                        const uint16_t& port);
     62  bool DeallocPTCPSocketChild(PTCPSocketChild*);
     63  PTCPServerSocketChild* AllocPTCPServerSocketChild(
     64      const uint16_t& aLocalPort, const uint16_t& aBacklog,
     65      const bool& aUseArrayBuffers);
     66  bool DeallocPTCPServerSocketChild(PTCPServerSocketChild*);
     67  PUDPSocketChild* AllocPUDPSocketChild(nsIPrincipal* aPrincipal,
     68                                        const nsACString& aFilter);
     69  bool DeallocPUDPSocketChild(PUDPSocketChild*);
     70  PTransportProviderChild* AllocPTransportProviderChild();
     71  bool DeallocPTransportProviderChild(PTransportProviderChild* aActor);
     72  PWebSocketEventListenerChild* AllocPWebSocketEventListenerChild(
     73      const uint64_t& aInnerWindowID);
     74  bool DeallocPWebSocketEventListenerChild(PWebSocketEventListenerChild*);
     75 
     76  mozilla::ipc::IPCResult RecvSpeculativeConnectRequest();
     77  mozilla::ipc::IPCResult RecvNetworkChangeNotification(nsCString const& type);
     78 
     79  mozilla::ipc::IPCResult RecvSetTRRDomain(const nsCString& domain);
     80 };
     81 
     82 /**
     83 * Reference to the PNecko Child protocol.
     84 * Null if this is not a content process.
     85 */
     86 extern PNeckoChild* gNeckoChild;
     87 
     88 }  // namespace net
     89 }  // namespace mozilla
     90 
     91 #endif  // mozilla_net_NeckoChild_h