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_ActioChild_h
|
|
|
|
#define mozilla_dom_cache_ActioChild_h
|
|
|
|
|
2020-05-11 15:12:22 +03:00
|
|
|
#include "mozilla/dom/SafeRefPtr.h"
|
2015-03-02 16:20:00 +03:00
|
|
|
|
2022-05-09 23:41:05 +03:00
|
|
|
namespace mozilla::dom::cache {
|
2015-03-02 16:20:00 +03:00
|
|
|
|
2019-07-12 14:17:59 +03:00
|
|
|
class CacheWorkerRef;
|
2015-03-02 16:20:00 +03:00
|
|
|
|
|
|
|
class ActorChild {
|
|
|
|
public:
|
|
|
|
virtual void StartDestroy() = 0;
|
2022-07-21 06:22:26 +03:00
|
|
|
virtual void NoteDeletedActor() { /*no-op*/
|
|
|
|
}
|
2015-03-02 16:20:00 +03:00
|
|
|
|
2020-05-11 15:12:22 +03:00
|
|
|
void SetWorkerRef(SafeRefPtr<CacheWorkerRef> aWorkerRef);
|
2015-03-02 16:20:00 +03:00
|
|
|
|
2019-07-12 14:17:59 +03:00
|
|
|
void RemoveWorkerRef();
|
2015-03-02 16:20:00 +03:00
|
|
|
|
2020-05-11 15:12:22 +03:00
|
|
|
const SafeRefPtr<CacheWorkerRef>& GetWorkerRefPtr() const;
|
2015-03-02 16:20:00 +03:00
|
|
|
|
2019-07-12 14:17:59 +03:00
|
|
|
bool WorkerRefNotified() const;
|
2015-03-02 16:20:00 +03:00
|
|
|
|
|
|
|
protected:
|
2015-03-16 17:10:36 +03:00
|
|
|
ActorChild();
|
2015-03-02 16:20:00 +03:00
|
|
|
~ActorChild();
|
|
|
|
|
|
|
|
private:
|
2020-05-11 15:12:22 +03:00
|
|
|
SafeRefPtr<CacheWorkerRef> mWorkerRef;
|
2015-03-02 16:20:00 +03:00
|
|
|
};
|
|
|
|
|
2022-05-09 23:41:05 +03:00
|
|
|
} // namespace mozilla::dom::cache
|
2015-03-02 16:20:00 +03:00
|
|
|
|
|
|
|
#endif // mozilla_dom_cache_ActioChild_h
|