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