tor-browser

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

CacheParent.h (1424B)


      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 
      7 #ifndef mozilla_dom_cache_CacheParent_h
      8 #define mozilla_dom_cache_CacheParent_h
      9 
     10 #include "mozilla/dom/SafeRefPtr.h"
     11 #include "mozilla/dom/cache/PCacheParent.h"
     12 #include "mozilla/dom/cache/Types.h"
     13 
     14 namespace mozilla::dom::cache {
     15 
     16 class Manager;
     17 
     18 class CacheParent final : public PCacheParent {
     19  friend class PCacheParent;
     20 
     21 public:
     22  CacheParent(const WeakRefParentType& aManagingActor,
     23              SafeRefPtr<cache::Manager> aManager, CacheId aCacheId);
     24 
     25 private:
     26  virtual ~CacheParent();
     27 
     28  // PCacheParent methods
     29  virtual void ActorDestroy(ActorDestroyReason aReason) override;
     30 
     31  already_AddRefed<PCacheOpParent> AllocPCacheOpParent(
     32      const CacheOpArgs& aOpArgs);
     33 
     34  virtual mozilla::ipc::IPCResult RecvPCacheOpConstructor(
     35      PCacheOpParent* actor, const CacheOpArgs& aOpArgs) override;
     36 
     37  mozilla::ipc::IPCResult RecvTeardown();
     38 
     39  const WeakRefParentType mManagingActor;
     40  SafeRefPtr<cache::Manager> mManager;
     41  const CacheId mCacheId;
     42 
     43  NS_INLINE_DECL_REFCOUNTING(CacheParent, override)
     44 };
     45 
     46 }  // namespace mozilla::dom::cache
     47 
     48 #endif  // mozilla_dom_cache_CacheParent_h