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"
15 class PBackgroundParent
;
19 namespace dom::cache
{
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
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