tor-browser

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

SocketProcessBridgeParent.h (1492B)


      1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
      2 /* This Source Code Form is subject to the terms of the Mozilla Public
      3 * License, v. 2.0. If a copy of the MPL was not distributed with this
      4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
      5 
      6 #ifndef mozilla_net_SocketProcessBridgeParent_h
      7 #define mozilla_net_SocketProcessBridgeParent_h
      8 
      9 #include "mozilla/net/PSocketProcessBridgeParent.h"
     10 
     11 namespace mozilla {
     12 namespace net {
     13 
     14 // The IPC actor implements PSocketProcessBridgeParent in socket process.
     15 // This is allocated and kept alive by SocketProcessChild. When |ActorDestroy|
     16 // is called, |SocketProcessChild::DestroySocketProcessBridgeParent| will be
     17 // called to destroy this actor.
     18 class SocketProcessBridgeParent final : public PSocketProcessBridgeParent {
     19 public:
     20  NS_INLINE_DECL_THREADSAFE_REFCOUNTING(SocketProcessBridgeParent, final)
     21 
     22  explicit SocketProcessBridgeParent(ProcessId aId);
     23 
     24  mozilla::ipc::IPCResult RecvInitBackgroundDataBridge(
     25      Endpoint<PBackgroundDataBridgeParent>&& aEndpoint, uint64_t aChannelID);
     26 
     27 #ifdef MOZ_WEBRTC
     28  mozilla::ipc::IPCResult RecvInitMediaTransport(
     29      Endpoint<PMediaTransportParent>&& aEndpoint);
     30 #endif
     31 
     32  void ActorDestroy(ActorDestroyReason aReason) override;
     33 
     34 private:
     35  ~SocketProcessBridgeParent();
     36 
     37  nsCOMPtr<nsISerialEventTarget> mMediaTransportTaskQueue;
     38  ProcessId mId;
     39 };
     40 
     41 }  // namespace net
     42 }  // namespace mozilla
     43 
     44 #endif  // mozilla_net_SocketProcessBridgeParent_h