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_CacheStorageParent_h
|
|
|
|
#define mozilla_dom_cache_CacheStorageParent_h
|
|
|
|
|
|
|
|
#include "mozilla/dom/cache/PCacheStorageParent.h"
|
|
|
|
#include "mozilla/dom/cache/PrincipalVerifier.h"
|
|
|
|
#include "mozilla/dom/cache/Types.h"
|
|
|
|
|
|
|
|
namespace mozilla {
|
|
|
|
namespace dom {
|
|
|
|
namespace cache {
|
|
|
|
|
|
|
|
class ManagerId;
|
|
|
|
|
2015-03-21 19:28:04 +03:00
|
|
|
class CacheStorageParent final : public PCacheStorageParent
|
2015-03-22 09:52:12 +03:00
|
|
|
, public PrincipalVerifier::Listener
|
2015-03-02 16:20:00 +03:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
CacheStorageParent(PBackgroundParent* aManagingActor, Namespace aNamespace,
|
|
|
|
const mozilla::ipc::PrincipalInfo& aPrincipalInfo);
|
|
|
|
virtual ~CacheStorageParent();
|
|
|
|
|
|
|
|
private:
|
|
|
|
// PCacheStorageParent methods
|
2015-04-16 22:00:15 +03:00
|
|
|
virtual void
|
|
|
|
ActorDestroy(ActorDestroyReason aReason) override;
|
2015-03-02 16:20:00 +03:00
|
|
|
|
2015-04-16 22:00:15 +03:00
|
|
|
virtual PCacheOpParent*
|
|
|
|
AllocPCacheOpParent(const CacheOpArgs& aOpArgs) override;
|
2015-03-02 16:20:00 +03:00
|
|
|
|
2015-04-16 22:00:15 +03:00
|
|
|
virtual bool
|
|
|
|
DeallocPCacheOpParent(PCacheOpParent* aActor) override;
|
2015-03-02 16:20:00 +03:00
|
|
|
|
2016-11-15 06:26:00 +03:00
|
|
|
virtual mozilla::ipc::IPCResult
|
2015-04-16 22:00:15 +03:00
|
|
|
RecvPCacheOpConstructor(PCacheOpParent* actor,
|
|
|
|
const CacheOpArgs& aOpArgs) override;
|
2015-03-02 16:20:00 +03:00
|
|
|
|
2016-11-15 06:26:00 +03:00
|
|
|
virtual mozilla::ipc::IPCResult
|
2015-04-16 22:00:15 +03:00
|
|
|
RecvTeardown() override;
|
2015-03-02 16:20:00 +03:00
|
|
|
|
2015-04-16 22:00:15 +03:00
|
|
|
// PrincipalVerifier::Listener methods
|
|
|
|
virtual void OnPrincipalVerified(nsresult aRv,
|
|
|
|
ManagerId* aManagerId) override;
|
2015-03-02 16:20:00 +03:00
|
|
|
|
|
|
|
const Namespace mNamespace;
|
2015-10-18 08:24:48 +03:00
|
|
|
RefPtr<PrincipalVerifier> mVerifier;
|
2015-03-02 16:20:00 +03:00
|
|
|
nsresult mVerifiedStatus;
|
2015-10-18 08:24:48 +03:00
|
|
|
RefPtr<ManagerId> mManagerId;
|
2015-03-02 16:20:00 +03:00
|
|
|
};
|
|
|
|
|
2015-07-13 18:25:42 +03:00
|
|
|
} // namespace cache
|
2015-03-02 16:20:00 +03:00
|
|
|
} // namespace dom
|
|
|
|
} // namespace mozilla
|
|
|
|
|
|
|
|
#endif // mozilla_dom_cache_CacheStorageParent_h
|