Backed out changeset 68ed52f7e45d (bug 1899241) for causing sccache misses (bug 19048...
[gecko.git] / netwerk / ipc / SocketProcessBridgeParent.h
blobe9b605366595392d1157a6eb8282e755fb3e3b51
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/. */
6 #ifndef mozilla_net_SocketProcessBridgeParent_h
7 #define mozilla_net_SocketProcessBridgeParent_h
9 #include "mozilla/net/PSocketProcessBridgeParent.h"
11 namespace mozilla {
12 namespace net {
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)
22 explicit SocketProcessBridgeParent(ProcessId aId);
24 mozilla::ipc::IPCResult RecvInitBackgroundDataBridge(
25 Endpoint<PBackgroundDataBridgeParent>&& aEndpoint, uint64_t aChannelID);
27 #ifdef MOZ_WEBRTC
28 mozilla::ipc::IPCResult RecvInitMediaTransport(
29 Endpoint<PMediaTransportParent>&& aEndpoint);
30 #endif
32 void ActorDestroy(ActorDestroyReason aReason) override;
34 private:
35 ~SocketProcessBridgeParent();
37 nsCOMPtr<nsISerialEventTarget> mMediaTransportTaskQueue;
38 ProcessId mId;
41 } // namespace net
42 } // namespace mozilla
44 #endif // mozilla_net_SocketProcessBridgeParent_h