/src/mozilla-central/dom/serviceworkers/ServiceWorkerActors.cpp
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 |
5 | | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
6 | | |
7 | | #include "ServiceWorkerActors.h" |
8 | | |
9 | | #include "ServiceWorkerChild.h" |
10 | | #include "ServiceWorkerContainerChild.h" |
11 | | #include "ServiceWorkerContainerParent.h" |
12 | | #include "ServiceWorkerParent.h" |
13 | | #include "ServiceWorkerRegistrationChild.h" |
14 | | #include "ServiceWorkerRegistrationParent.h" |
15 | | |
16 | | namespace mozilla { |
17 | | namespace dom { |
18 | | |
19 | | PServiceWorkerChild* |
20 | | AllocServiceWorkerChild() |
21 | 0 | { |
22 | 0 | MOZ_CRASH("should not be called"); |
23 | 0 | } |
24 | | |
25 | | bool |
26 | | DeallocServiceWorkerChild(PServiceWorkerChild* aActor) |
27 | 0 | { |
28 | 0 | auto actor = static_cast<ServiceWorkerChild*>(aActor); |
29 | 0 | delete actor; |
30 | 0 | return true; |
31 | 0 | } |
32 | | |
33 | | PServiceWorkerParent* |
34 | | AllocServiceWorkerParent() |
35 | 0 | { |
36 | 0 | return new ServiceWorkerParent(); |
37 | 0 | } |
38 | | |
39 | | bool |
40 | | DeallocServiceWorkerParent(PServiceWorkerParent* aActor) |
41 | 0 | { |
42 | 0 | auto actor = static_cast<ServiceWorkerParent*>(aActor); |
43 | 0 | delete actor; |
44 | 0 | return true; |
45 | 0 | } |
46 | | |
47 | | void |
48 | | InitServiceWorkerParent(PServiceWorkerParent* aActor, |
49 | | const IPCServiceWorkerDescriptor& aDescriptor) |
50 | 0 | { |
51 | 0 | auto actor = static_cast<ServiceWorkerParent*>(aActor); |
52 | 0 | actor->Init(aDescriptor); |
53 | 0 | } |
54 | | |
55 | | PServiceWorkerContainerChild* |
56 | | AllocServiceWorkerContainerChild() |
57 | 0 | { |
58 | 0 | MOZ_CRASH("should not be called"); |
59 | 0 | } |
60 | | |
61 | | bool |
62 | | DeallocServiceWorkerContainerChild(PServiceWorkerContainerChild* aActor) |
63 | 0 | { |
64 | 0 | auto actor = static_cast<ServiceWorkerContainerChild*>(aActor); |
65 | 0 | delete actor; |
66 | 0 | return true; |
67 | 0 | } |
68 | | |
69 | | PServiceWorkerContainerParent* |
70 | | AllocServiceWorkerContainerParent() |
71 | 0 | { |
72 | 0 | return new ServiceWorkerContainerParent(); |
73 | 0 | } |
74 | | |
75 | | bool |
76 | | DeallocServiceWorkerContainerParent(PServiceWorkerContainerParent* aActor) |
77 | 0 | { |
78 | 0 | auto actor = static_cast<ServiceWorkerContainerParent*>(aActor); |
79 | 0 | delete actor; |
80 | 0 | return true; |
81 | 0 | } |
82 | | |
83 | | void |
84 | | InitServiceWorkerContainerParent(PServiceWorkerContainerParent* aActor) |
85 | 0 | { |
86 | 0 | auto actor = static_cast<ServiceWorkerContainerParent*>(aActor); |
87 | 0 | actor->Init(); |
88 | 0 | } |
89 | | |
90 | | PServiceWorkerRegistrationChild* |
91 | | AllocServiceWorkerRegistrationChild() |
92 | 0 | { |
93 | 0 | MOZ_CRASH("should not be called"); |
94 | 0 | } |
95 | | |
96 | | bool |
97 | | DeallocServiceWorkerRegistrationChild(PServiceWorkerRegistrationChild* aActor) |
98 | 0 | { |
99 | 0 | auto actor = static_cast<ServiceWorkerRegistrationChild*>(aActor); |
100 | 0 | delete actor; |
101 | 0 | return true; |
102 | 0 | } |
103 | | |
104 | | PServiceWorkerRegistrationParent* |
105 | | AllocServiceWorkerRegistrationParent() |
106 | 0 | { |
107 | 0 | return new ServiceWorkerRegistrationParent(); |
108 | 0 | } |
109 | | |
110 | | bool |
111 | | DeallocServiceWorkerRegistrationParent(PServiceWorkerRegistrationParent* aActor) |
112 | 0 | { |
113 | 0 | auto actor = static_cast<ServiceWorkerRegistrationParent*>(aActor); |
114 | 0 | delete actor; |
115 | 0 | return true; |
116 | 0 | } |
117 | | |
118 | | void |
119 | | InitServiceWorkerRegistrationParent(PServiceWorkerRegistrationParent* aActor, |
120 | | const IPCServiceWorkerRegistrationDescriptor& aDescriptor) |
121 | 0 | { |
122 | 0 | auto actor = static_cast<ServiceWorkerRegistrationParent*>(aActor); |
123 | 0 | actor->Init(aDescriptor); |
124 | 0 | } |
125 | | |
126 | | } // namespace dom |
127 | | } // namespace mozilla |