Backed out changeset b462e7b742d8 (bug 1908261) for causing multiple reftest failures...
[gecko.git] / dom / cache / ActorChild.h
blob8bb206b52b2d32a62c51e49e2bfd351b92b6787b
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*/ }
21 void SetWorkerRef(SafeRefPtr<CacheWorkerRef> aWorkerRef);
23 void RemoveWorkerRef();
25 const SafeRefPtr<CacheWorkerRef>& GetWorkerRefPtr() const;
27 bool WorkerRefNotified() const;
29 protected:
30 ActorChild();
31 ~ActorChild();
33 private:
34 SafeRefPtr<CacheWorkerRef> mWorkerRef;
37 } // namespace mozilla::dom::cache
39 #endif // mozilla_dom_cache_ActioChild_h