Bug 1696969 [wpt PR 27896] - Allow fuzzy matching for replaced-element-003, a=testonly
[gecko.git] / netwerk / ipc / SocketProcessBridgeParent.h
blobf35559d464595695185c5006f4d38d2f7e31d03b
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)
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; }
34 private:
35 ~SocketProcessBridgeParent();
37 ProcessId mId;
38 bool mClosed;
41 } // namespace net
42 } // namespace mozilla
44 #endif // mozilla_net_SocketProcessBridgeParent_h