Bug 1826136 [wpt PR 39338] - Update wpt metadata, a=testonly
[gecko.git] / dom / cache / ActorChild.h
blobe7d375173d2c36bb09624a0adb88cc19399d2014
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_ActioChild_h
8 #define mozilla_dom_cache_ActioChild_h
10 #include "mozilla/dom/SafeRefPtr.h"
12 namespace mozilla::dom::cache {
14 class CacheWorkerRef;
16 class ActorChild {
17 public:
18 virtual void StartDestroy() = 0;
19 virtual void NoteDeletedActor() { /*no-op*/
22 void SetWorkerRef(SafeRefPtr<CacheWorkerRef> aWorkerRef);
24 void RemoveWorkerRef();
26 const SafeRefPtr<CacheWorkerRef>& GetWorkerRefPtr() const;
28 bool WorkerRefNotified() const;
30 protected:
31 ActorChild();
32 ~ActorChild();
34 private:
35 SafeRefPtr<CacheWorkerRef> mWorkerRef;
38 } // namespace mozilla::dom::cache
40 #endif // mozilla_dom_cache_ActioChild_h