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"
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
{
20 NS_INLINE_DECL_THREADSAFE_REFCOUNTING(SocketProcessBridgeParent
)
22 explicit SocketProcessBridgeParent(
23 ProcessId aId
, Endpoint
<PSocketProcessBridgeParent
>&& aEndpoint
);
25 mozilla::ipc::IPCResult
RecvTest();
26 mozilla::ipc::IPCResult
RecvInitBackground(
27 Endpoint
<PBackgroundParent
>&& aEndpoint
);
29 void ActorDestroy(ActorDestroyReason aWhy
) override
;
30 void DeferredDestroy();
32 bool Closed() const { return mClosed
; }
35 ~SocketProcessBridgeParent();
42 } // namespace mozilla
44 #endif // mozilla_net_SocketProcessBridgeParent_h