Bug 1842773 - Part 18: Update TypedArray length, byteLength, and byteOffset accesses...
[gecko.git] / dom / serviceworkers / ServiceWorkerContainerChild.h
blob4d9df91f0bd042fdcc14cfef16e977a39d148c8d
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_serviceworkercontainerchild_h__
8 #define mozilla_dom_serviceworkercontainerchild_h__
10 #include "mozilla/dom/PServiceWorkerContainerChild.h"
12 // XXX Avoid including this here by moving function bodies to the cpp file
13 #include "mozilla/dom/WorkerRef.h"
15 namespace mozilla::dom {
17 class ServiceWorkerContainer;
19 class IPCWorkerRef;
21 class ServiceWorkerContainerChild final : public PServiceWorkerContainerChild {
22 RefPtr<IPCWorkerRef> mIPCWorkerRef;
23 ServiceWorkerContainer* mOwner;
24 bool mTeardownStarted;
26 ServiceWorkerContainerChild();
28 ~ServiceWorkerContainerChild() = default;
30 // PServiceWorkerContainerChild
31 void ActorDestroy(ActorDestroyReason aReason) override;
33 public:
34 NS_INLINE_DECL_REFCOUNTING(ServiceWorkerContainerChild, override);
36 static already_AddRefed<ServiceWorkerContainerChild> Create();
38 void SetOwner(ServiceWorkerContainer* aOwner);
40 void RevokeOwner(ServiceWorkerContainer* aOwner);
42 void MaybeStartTeardown();
45 } // namespace mozilla::dom
47 #endif // mozilla_dom_serviceworkercontainerchild_h__