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_ActorUtils_h 8 #define mozilla_dom_cache_ActorUtils_h 9 10 #include "mozilla/dom/cache/Types.h" 11 12 namespace mozilla { 13 14 namespace ipc { 15 class PBackgroundParent; 16 class PrincipalInfo; 17 } // namespace ipc 18 19 namespace dom { 20 namespace cache { 21 22 class PCacheChild; 23 class PCacheParent; 24 class PCacheStreamControlChild; 25 class PCacheStreamControlParent; 26 class PCacheStorageChild; 27 class PCacheStorageParent; 28 29 // Factory methods for use in ipc/glue methods. Implemented in individual actor 30 // cpp files. 31 32 PCacheChild* AllocPCacheChild(); 33 34 void DeallocPCacheChild(PCacheChild* aActor); 35 36 void DeallocPCacheParent(PCacheParent* aActor); 37 38 already_AddRefed<PCacheStreamControlChild> AllocPCacheStreamControlChild(); 39 40 void DeallocPCacheStreamControlParent(PCacheStreamControlParent* aActor); 41 42 PCacheStorageParent* AllocPCacheStorageParent( 43 mozilla::ipc::PBackgroundParent* aManagingActor, Namespace aNamespace, 44 const mozilla::ipc::PrincipalInfo& aPrincipalInfo); 45 46 void DeallocPCacheStorageChild(PCacheStorageChild* aActor); 47 48 void DeallocPCacheStorageParent(PCacheStorageParent* aActor); 49 50 } // namespace cache 51 } // namespace dom 52 } // namespace mozilla 53 54 #endif // mozilla_dom_cache_ActorUtils_h 55