2015-03-02 16:20:00 +03:00
|
|
|
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
|
|
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
|
|
|
|
|
#ifndef mozilla_dom_cache_CacheParent_h
|
|
|
|
#define mozilla_dom_cache_CacheParent_h
|
|
|
|
|
2020-05-11 15:09:02 +03:00
|
|
|
#include "mozilla/dom/SafeRefPtr.h"
|
2015-03-02 16:20:00 +03:00
|
|
|
#include "mozilla/dom/cache/PCacheParent.h"
|
|
|
|
#include "mozilla/dom/cache/Types.h"
|
|
|
|
|
|
|
|
namespace mozilla {
|
|
|
|
namespace dom {
|
|
|
|
namespace cache {
|
|
|
|
|
2015-04-16 22:00:15 +03:00
|
|
|
class Manager;
|
2015-03-02 16:20:00 +03:00
|
|
|
|
2015-03-21 19:28:04 +03:00
|
|
|
class CacheParent final : public PCacheParent {
|
2019-02-06 18:57:37 +03:00
|
|
|
friend class PCacheParent;
|
|
|
|
|
2015-03-02 16:20:00 +03:00
|
|
|
public:
|
2020-05-11 15:09:02 +03:00
|
|
|
CacheParent(SafeRefPtr<cache::Manager> aManager, CacheId aCacheId);
|
2015-03-02 16:20:00 +03:00
|
|
|
virtual ~CacheParent();
|
|
|
|
|
|
|
|
private:
|
2015-04-16 22:00:15 +03:00
|
|
|
// PCacheParent methods
|
2015-03-21 19:28:04 +03:00
|
|
|
virtual void ActorDestroy(ActorDestroyReason aReason) override;
|
2015-04-16 22:00:15 +03:00
|
|
|
|
2020-08-05 21:39:56 +03:00
|
|
|
PCacheOpParent* AllocPCacheOpParent(const CacheOpArgs& aOpArgs);
|
|
|
|
|
|
|
|
bool DeallocPCacheOpParent(PCacheOpParent* aActor);
|
2015-04-16 22:00:15 +03:00
|
|
|
|
2016-11-15 06:26:00 +03:00
|
|
|
virtual mozilla::ipc::IPCResult RecvPCacheOpConstructor(
|
2015-04-16 22:00:15 +03:00
|
|
|
PCacheOpParent* actor, const CacheOpArgs& aOpArgs) override;
|
2015-03-02 16:20:00 +03:00
|
|
|
|
2019-02-06 18:58:43 +03:00
|
|
|
mozilla::ipc::IPCResult RecvTeardown();
|
2015-03-02 16:20:00 +03:00
|
|
|
|
2020-05-11 15:09:02 +03:00
|
|
|
SafeRefPtr<cache::Manager> mManager;
|
2015-03-02 16:20:00 +03:00
|
|
|
const CacheId mCacheId;
|
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace cache
|
|
|
|
} // namespace dom
|
|
|
|
} // namespace mozilla
|
|
|
|
|
|
|
|
#endif // mozilla_dom_cache_CacheParent_h
|