Backed out changeset 1d9301697aa0 (bug 1887752) for causing failures on browser_all_f...
[gecko.git] / dom / cache / ActorUtils.h
blob030e278bc2fca3b54370a0798c1f20f1d1b5b1b4
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/. */
7 #ifndef mozilla_dom_cache_ActorUtils_h
8 #define mozilla_dom_cache_ActorUtils_h
10 #include "mozilla/dom/cache/Types.h"
12 namespace mozilla {
14 namespace ipc {
15 class PBackgroundParent;
16 class PrincipalInfo;
17 } // namespace ipc
19 namespace dom::cache {
21 class PCacheChild;
22 class PCacheParent;
23 class PCacheStreamControlChild;
24 class PCacheStreamControlParent;
25 class PCacheStorageChild;
26 class PCacheStorageParent;
28 // Factory methods for use in ipc/glue methods. Implemented in individual actor
29 // cpp files.
31 already_AddRefed<PCacheChild> AllocPCacheChild();
33 void DeallocPCacheChild(PCacheChild* aActor);
35 void DeallocPCacheParent(PCacheParent* aActor);
37 already_AddRefed<PCacheStreamControlChild> AllocPCacheStreamControlChild();
39 void DeallocPCacheStreamControlParent(PCacheStreamControlParent* aActor);
41 already_AddRefed<PCacheStorageParent> AllocPCacheStorageParent(
42 mozilla::ipc::PBackgroundParent* aManagingActor, Namespace aNamespace,
43 const mozilla::ipc::PrincipalInfo& aPrincipalInfo);
45 void DeallocPCacheStorageChild(PCacheStorageChild* aActor);
47 void DeallocPCacheStorageParent(PCacheStorageParent* aActor);
49 } // namespace dom::cache
50 } // namespace mozilla
52 #endif // mozilla_dom_cache_ActorUtils_h