Source code

Revision control

Other Tools

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/. */
6
7
#ifndef mozilla_dom_serviceworkerchild_h__
8
#define mozilla_dom_serviceworkerchild_h__
9
10
#include "mozilla/dom/PServiceWorkerChild.h"
11
12
namespace mozilla {
13
namespace dom {
14
15
class IPCWorkerRef;
16
class RemoteServiceWorkerImpl;
17
18
class ServiceWorkerChild final : public PServiceWorkerChild {
19
RefPtr<IPCWorkerRef> mIPCWorkerRef;
20
RemoteServiceWorkerImpl* mOwner;
21
bool mTeardownStarted;
22
23
ServiceWorkerChild();
24
25
// PServiceWorkerChild
26
void ActorDestroy(ActorDestroyReason aReason) override;
27
28
public:
29
static ServiceWorkerChild* Create();
30
31
~ServiceWorkerChild() = default;
32
33
void SetOwner(RemoteServiceWorkerImpl* aOwner);
34
35
void RevokeOwner(RemoteServiceWorkerImpl* aOwner);
36
37
void MaybeStartTeardown();
38
};
39
40
} // namespace dom
41
} // namespace mozilla
42
43
#endif // mozilla_dom_serviceworkerchild_h__