tor-browser

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

ClientHandleChild.h (1430B)


      1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
      2 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
      3 /* This Source Code Form is subject to the terms of the Mozilla Public
      4 * License, v. 2.0. If a copy of the MPL was not distributed with this
      5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
      6 #ifndef _mozilla_dom_ClientHandleChild_h
      7 #define _mozilla_dom_ClientHandleChild_h
      8 
      9 #include "ClientThing.h"
     10 #include "mozilla/dom/PClientHandleChild.h"
     11 
     12 namespace mozilla::dom {
     13 
     14 class ClientHandle;
     15 class ClientInfo;
     16 
     17 template <typename ActorType>
     18 class ClientThing;
     19 
     20 class ClientHandleChild final : public PClientHandleChild {
     21  ClientHandle* mHandle;
     22  bool mTeardownStarted;
     23 
     24  ~ClientHandleChild() = default;
     25 
     26  // PClientHandleChild interface
     27  mozilla::ipc::IPCResult RecvExecutionReady(
     28      const IPCClientInfo& aClientInfo) override;
     29 
     30  void ActorDestroy(ActorDestroyReason aReason) override;
     31 
     32  PClientHandleOpChild* AllocPClientHandleOpChild(
     33      const ClientOpConstructorArgs& aArgs) override;
     34 
     35  bool DeallocPClientHandleOpChild(PClientHandleOpChild* aActor) override;
     36 
     37 public:
     38  NS_INLINE_DECL_REFCOUNTING(ClientHandleChild, override)
     39 
     40  ClientHandleChild();
     41 
     42  void SetOwner(ClientThing<ClientHandleChild>* aThing);
     43 
     44  void RevokeOwner(ClientThing<ClientHandleChild>* aThing);
     45 
     46  void MaybeStartTeardown();
     47 };
     48 
     49 }  // namespace mozilla::dom
     50 
     51 #endif  // _mozilla_dom_ClientHandleChild_h