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
#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* AllocServiceWorkerChild() {
20
MOZ_CRASH("should not be called");
21
}
22
23
bool DeallocServiceWorkerChild(PServiceWorkerChild* aActor) {
24
auto actor = static_cast<ServiceWorkerChild*>(aActor);
25
delete actor;
26
return true;
27
}
28
29
PServiceWorkerParent* AllocServiceWorkerParent() {
30
return new ServiceWorkerParent();
31
}
32
33
bool DeallocServiceWorkerParent(PServiceWorkerParent* aActor) {
34
auto actor = static_cast<ServiceWorkerParent*>(aActor);
35
delete actor;
36
return true;
37
}
38
39
void InitServiceWorkerParent(PServiceWorkerParent* aActor,
40
const IPCServiceWorkerDescriptor& aDescriptor) {
41
auto actor = static_cast<ServiceWorkerParent*>(aActor);
42
actor->Init(aDescriptor);
43
}
44
45
PServiceWorkerContainerChild* AllocServiceWorkerContainerChild() {
46
MOZ_CRASH("should not be called");
47
}
48
49
bool DeallocServiceWorkerContainerChild(PServiceWorkerContainerChild* aActor) {
50
auto actor = static_cast<ServiceWorkerContainerChild*>(aActor);
51
delete actor;
52
return true;
53
}
54
55
PServiceWorkerContainerParent* AllocServiceWorkerContainerParent() {
56
return new ServiceWorkerContainerParent();
57
}
58
59
bool DeallocServiceWorkerContainerParent(
60
PServiceWorkerContainerParent* aActor) {
61
auto actor = static_cast<ServiceWorkerContainerParent*>(aActor);
62
delete actor;
63
return true;
64
}
65
66
void InitServiceWorkerContainerParent(PServiceWorkerContainerParent* aActor) {
67
auto actor = static_cast<ServiceWorkerContainerParent*>(aActor);
68
actor->Init();
69
}
70
71
PServiceWorkerRegistrationChild* AllocServiceWorkerRegistrationChild() {
72
MOZ_CRASH("should not be called");
73
}
74
75
bool DeallocServiceWorkerRegistrationChild(
76
PServiceWorkerRegistrationChild* aActor) {
77
auto actor = static_cast<ServiceWorkerRegistrationChild*>(aActor);
78
delete actor;
79
return true;
80
}
81
82
PServiceWorkerRegistrationParent* AllocServiceWorkerRegistrationParent() {
83
return new ServiceWorkerRegistrationParent();
84
}
85
86
bool DeallocServiceWorkerRegistrationParent(
87
PServiceWorkerRegistrationParent* aActor) {
88
auto actor = static_cast<ServiceWorkerRegistrationParent*>(aActor);
89
delete actor;
90
return true;
91
}
92
93
void InitServiceWorkerRegistrationParent(
94
PServiceWorkerRegistrationParent* aActor,
95
const IPCServiceWorkerRegistrationDescriptor& aDescriptor) {
96
auto actor = static_cast<ServiceWorkerRegistrationParent*>(aActor);
97
actor->Init(aDescriptor);
98
}
99
100
} // namespace dom
101
} // namespace mozilla