/src/mozilla-central/dom/serviceworkers/ServiceWorkerManagerChild.h
Line | Count | Source (jump to first uncovered line) |
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 file, |
5 | | * You can obtain one at http://mozilla.org/MPL/2.0/. */ |
6 | | |
7 | | #ifndef mozilla_dom_ServiceWorkerManagerChild_h |
8 | | #define mozilla_dom_ServiceWorkerManagerChild_h |
9 | | |
10 | | #include "mozilla/dom/PServiceWorkerManagerChild.h" |
11 | | #include "mozilla/ipc/BackgroundUtils.h" |
12 | | |
13 | | namespace mozilla { |
14 | | |
15 | | class OriginAttributes; |
16 | | |
17 | | namespace ipc { |
18 | | class BackgroundChildImpl; |
19 | | } // namespace ipc |
20 | | |
21 | | namespace dom { |
22 | | |
23 | | class ServiceWorkerManagerChild final : public PServiceWorkerManagerChild |
24 | | { |
25 | | friend class mozilla::ipc::BackgroundChildImpl; |
26 | | |
27 | | public: |
28 | | NS_INLINE_DECL_REFCOUNTING(ServiceWorkerManagerChild) |
29 | | |
30 | | void ManagerShuttingDown() |
31 | 0 | { |
32 | 0 | mShuttingDown = true; |
33 | 0 | } |
34 | | |
35 | | virtual mozilla::ipc::IPCResult RecvNotifyRegister(const ServiceWorkerRegistrationData& aData) |
36 | | override; |
37 | | |
38 | | virtual mozilla::ipc::IPCResult RecvNotifySoftUpdate(const OriginAttributes& aOriginAttributes, |
39 | | const nsString& aScope) override; |
40 | | |
41 | | virtual mozilla::ipc::IPCResult RecvNotifyUnregister(const PrincipalInfo& aPrincipalInfo, |
42 | | const nsString& aScope) override; |
43 | | |
44 | | virtual mozilla::ipc::IPCResult RecvNotifyRemove(const nsCString& aHost) override; |
45 | | |
46 | | virtual mozilla::ipc::IPCResult RecvNotifyRemoveAll() override; |
47 | | |
48 | | virtual PServiceWorkerUpdaterChild* |
49 | | AllocPServiceWorkerUpdaterChild(const OriginAttributes& originAttributes, |
50 | | const nsCString& scope) override; |
51 | | |
52 | | virtual bool |
53 | | DeallocPServiceWorkerUpdaterChild(PServiceWorkerUpdaterChild* aActor) override; |
54 | | |
55 | | private: |
56 | | ServiceWorkerManagerChild() |
57 | | : mShuttingDown(false) |
58 | | {} |
59 | | |
60 | | ~ServiceWorkerManagerChild() {} |
61 | | |
62 | | bool mShuttingDown; |
63 | | }; |
64 | | |
65 | | } // namespace dom |
66 | | } // namespace mozilla |
67 | | |
68 | | #endif // mozilla_dom_ServiceWorkerManagerChild_h |