Bug 1578501 [wpt PR 18803] - WebKit export of https://bugs.webkit.org/show_bug.cgi...
[gecko.git] / ipc / glue / BackgroundParentImpl.h
blob20a6b73fdcd6e4266407ca8756a244695eab6245
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/. */
7 #ifndef mozilla_ipc_backgroundparentimpl_h__
8 #define mozilla_ipc_backgroundparentimpl_h__
10 #include "mozilla/Attributes.h"
11 #include "mozilla/ipc/PBackgroundParent.h"
13 namespace mozilla {
15 namespace layout {
16 class VsyncParent;
17 } // namespace layout
19 namespace ipc {
21 // Instances of this class should never be created directly. This class is meant
22 // to be inherited in BackgroundImpl.
23 class BackgroundParentImpl : public PBackgroundParent {
24 protected:
25 BackgroundParentImpl();
26 virtual ~BackgroundParentImpl();
28 virtual void ActorDestroy(ActorDestroyReason aWhy) override;
30 virtual PBackgroundTestParent* AllocPBackgroundTestParent(
31 const nsCString& aTestArg) override;
33 virtual mozilla::ipc::IPCResult RecvPBackgroundTestConstructor(
34 PBackgroundTestParent* aActor, const nsCString& aTestArg) override;
36 virtual bool DeallocPBackgroundTestParent(
37 PBackgroundTestParent* aActor) override;
39 virtual PBackgroundIDBFactoryParent* AllocPBackgroundIDBFactoryParent(
40 const LoggingInfo& aLoggingInfo) override;
42 virtual mozilla::ipc::IPCResult RecvPBackgroundIDBFactoryConstructor(
43 PBackgroundIDBFactoryParent* aActor,
44 const LoggingInfo& aLoggingInfo) override;
46 virtual bool DeallocPBackgroundIDBFactoryParent(
47 PBackgroundIDBFactoryParent* aActor) override;
49 virtual PBackgroundIndexedDBUtilsParent*
50 AllocPBackgroundIndexedDBUtilsParent() override;
52 virtual bool DeallocPBackgroundIndexedDBUtilsParent(
53 PBackgroundIndexedDBUtilsParent* aActor) override;
55 virtual mozilla::ipc::IPCResult RecvFlushPendingFileDeletions() override;
57 virtual PBackgroundSDBConnectionParent* AllocPBackgroundSDBConnectionParent(
58 const PrincipalInfo& aPrincipalInfo) override;
60 virtual mozilla::ipc::IPCResult RecvPBackgroundSDBConnectionConstructor(
61 PBackgroundSDBConnectionParent* aActor,
62 const PrincipalInfo& aPrincipalInfo) override;
64 virtual bool DeallocPBackgroundSDBConnectionParent(
65 PBackgroundSDBConnectionParent* aActor) override;
67 virtual PBackgroundLSDatabaseParent* AllocPBackgroundLSDatabaseParent(
68 const PrincipalInfo& aPrincipalInfo, const uint32_t& aPrivateBrowsingId,
69 const uint64_t& aDatastoreId) override;
71 virtual mozilla::ipc::IPCResult RecvPBackgroundLSDatabaseConstructor(
72 PBackgroundLSDatabaseParent* aActor, const PrincipalInfo& aPrincipalInfo,
73 const uint32_t& aPrivateBrowsingId,
74 const uint64_t& aDatastoreId) override;
76 virtual bool DeallocPBackgroundLSDatabaseParent(
77 PBackgroundLSDatabaseParent* aActor) override;
79 virtual PBackgroundLSObserverParent* AllocPBackgroundLSObserverParent(
80 const uint64_t& aObserverId) override;
82 virtual mozilla::ipc::IPCResult RecvPBackgroundLSObserverConstructor(
83 PBackgroundLSObserverParent* aActor,
84 const uint64_t& aObserverId) override;
86 virtual bool DeallocPBackgroundLSObserverParent(
87 PBackgroundLSObserverParent* aActor) override;
89 virtual PBackgroundLSRequestParent* AllocPBackgroundLSRequestParent(
90 const LSRequestParams& aParams) override;
92 virtual mozilla::ipc::IPCResult RecvPBackgroundLSRequestConstructor(
93 PBackgroundLSRequestParent* aActor,
94 const LSRequestParams& aParams) override;
96 virtual bool DeallocPBackgroundLSRequestParent(
97 PBackgroundLSRequestParent* aActor) override;
99 virtual PBackgroundLSSimpleRequestParent*
100 AllocPBackgroundLSSimpleRequestParent(
101 const LSSimpleRequestParams& aParams) override;
103 virtual mozilla::ipc::IPCResult RecvPBackgroundLSSimpleRequestConstructor(
104 PBackgroundLSSimpleRequestParent* aActor,
105 const LSSimpleRequestParams& aParams) override;
107 virtual bool DeallocPBackgroundLSSimpleRequestParent(
108 PBackgroundLSSimpleRequestParent* aActor) override;
110 virtual mozilla::ipc::IPCResult RecvLSClearPrivateBrowsing() override;
112 virtual PBackgroundLocalStorageCacheParent*
113 AllocPBackgroundLocalStorageCacheParent(
114 const PrincipalInfo& aPrincipalInfo, const nsCString& aOriginKey,
115 const uint32_t& aPrivateBrowsingId) override;
117 virtual mozilla::ipc::IPCResult RecvPBackgroundLocalStorageCacheConstructor(
118 PBackgroundLocalStorageCacheParent* aActor,
119 const PrincipalInfo& aPrincipalInfo, const nsCString& aOriginKey,
120 const uint32_t& aPrivateBrowsingId) override;
122 virtual bool DeallocPBackgroundLocalStorageCacheParent(
123 PBackgroundLocalStorageCacheParent* aActor) override;
125 virtual PBackgroundStorageParent* AllocPBackgroundStorageParent(
126 const nsString& aProfilePath) override;
128 virtual mozilla::ipc::IPCResult RecvPBackgroundStorageConstructor(
129 PBackgroundStorageParent* aActor, const nsString& aProfilePath) override;
131 virtual bool DeallocPBackgroundStorageParent(
132 PBackgroundStorageParent* aActor) override;
134 virtual PPendingIPCBlobParent* AllocPPendingIPCBlobParent(
135 const IPCBlob& aBlob) override;
137 virtual bool DeallocPPendingIPCBlobParent(
138 PPendingIPCBlobParent* aActor) override;
140 virtual already_AddRefed<PIPCBlobInputStreamParent>
141 AllocPIPCBlobInputStreamParent(const nsID& aID,
142 const uint64_t& aSize) override;
144 virtual mozilla::ipc::IPCResult RecvPIPCBlobInputStreamConstructor(
145 PIPCBlobInputStreamParent* aActor, const nsID& aID,
146 const uint64_t& aSize) override;
148 virtual PTemporaryIPCBlobParent* AllocPTemporaryIPCBlobParent() override;
150 virtual mozilla::ipc::IPCResult RecvPTemporaryIPCBlobConstructor(
151 PTemporaryIPCBlobParent* actor) override;
153 virtual bool DeallocPTemporaryIPCBlobParent(
154 PTemporaryIPCBlobParent* aActor) override;
156 virtual PFileCreatorParent* AllocPFileCreatorParent(
157 const nsString& aFullPath, const nsString& aType, const nsString& aName,
158 const Maybe<int64_t>& aLastModified, const bool& aExistenceCheck,
159 const bool& aIsFromNsIFile) override;
161 virtual mozilla::ipc::IPCResult RecvPFileCreatorConstructor(
162 PFileCreatorParent* actor, const nsString& aFullPath,
163 const nsString& aType, const nsString& aName,
164 const Maybe<int64_t>& aLastModified, const bool& aExistenceCheck,
165 const bool& aIsFromNsIFile) override;
167 virtual bool DeallocPFileCreatorParent(PFileCreatorParent* aActor) override;
169 virtual mozilla::dom::PRemoteWorkerParent* AllocPRemoteWorkerParent(
170 const RemoteWorkerData& aData) override;
172 virtual bool DeallocPRemoteWorkerParent(PRemoteWorkerParent* aActor) override;
174 virtual mozilla::dom::PRemoteWorkerControllerParent*
175 AllocPRemoteWorkerControllerParent(
176 const mozilla::dom::RemoteWorkerData& aRemoteWorkerData) override;
178 virtual mozilla::ipc::IPCResult RecvPRemoteWorkerControllerConstructor(
179 mozilla::dom::PRemoteWorkerControllerParent* aActor,
180 const mozilla::dom::RemoteWorkerData& aRemoteWorkerData) override;
182 virtual bool DeallocPRemoteWorkerControllerParent(
183 mozilla::dom::PRemoteWorkerControllerParent* aActor) override;
185 virtual mozilla::dom::PRemoteWorkerServiceParent*
186 AllocPRemoteWorkerServiceParent() override;
188 virtual mozilla::ipc::IPCResult RecvPRemoteWorkerServiceConstructor(
189 PRemoteWorkerServiceParent* aActor) override;
191 virtual bool DeallocPRemoteWorkerServiceParent(
192 PRemoteWorkerServiceParent* aActor) override;
194 virtual mozilla::dom::PSharedWorkerParent* AllocPSharedWorkerParent(
195 const mozilla::dom::RemoteWorkerData& aData, const uint64_t& aWindowID,
196 const mozilla::dom::MessagePortIdentifier& aPortIdentifier) override;
198 virtual mozilla::ipc::IPCResult RecvPSharedWorkerConstructor(
199 PSharedWorkerParent* aActor, const mozilla::dom::RemoteWorkerData& aData,
200 const uint64_t& aWindowID,
201 const mozilla::dom::MessagePortIdentifier& aPortIdentifier) override;
203 virtual bool DeallocPSharedWorkerParent(PSharedWorkerParent* aActor) override;
205 virtual PFileDescriptorSetParent* AllocPFileDescriptorSetParent(
206 const FileDescriptor& aFileDescriptor) override;
208 virtual bool DeallocPFileDescriptorSetParent(
209 PFileDescriptorSetParent* aActor) override;
211 virtual PVsyncParent* AllocPVsyncParent() override;
213 virtual bool DeallocPVsyncParent(PVsyncParent* aActor) override;
215 virtual PBroadcastChannelParent* AllocPBroadcastChannelParent(
216 const PrincipalInfo& aPrincipalInfo, const nsCString& aOrigin,
217 const nsString& aChannel) override;
219 virtual mozilla::ipc::IPCResult RecvPBroadcastChannelConstructor(
220 PBroadcastChannelParent* actor, const PrincipalInfo& aPrincipalInfo,
221 const nsCString& origin, const nsString& channel) override;
223 virtual bool DeallocPBroadcastChannelParent(
224 PBroadcastChannelParent* aActor) override;
226 virtual PChildToParentStreamParent* AllocPChildToParentStreamParent()
227 override;
229 virtual bool DeallocPChildToParentStreamParent(
230 PChildToParentStreamParent* aActor) override;
232 virtual PParentToChildStreamParent* AllocPParentToChildStreamParent()
233 override;
235 virtual bool DeallocPParentToChildStreamParent(
236 PParentToChildStreamParent* aActor) override;
238 virtual PServiceWorkerManagerParent* AllocPServiceWorkerManagerParent()
239 override;
241 virtual bool DeallocPServiceWorkerManagerParent(
242 PServiceWorkerManagerParent* aActor) override;
244 virtual PCamerasParent* AllocPCamerasParent() override;
246 virtual bool DeallocPCamerasParent(PCamerasParent* aActor) override;
248 virtual mozilla::ipc::IPCResult RecvShutdownServiceWorkerRegistrar() override;
250 virtual dom::cache::PCacheStorageParent* AllocPCacheStorageParent(
251 const dom::cache::Namespace& aNamespace,
252 const PrincipalInfo& aPrincipalInfo) override;
254 virtual bool DeallocPCacheStorageParent(
255 dom::cache::PCacheStorageParent* aActor) override;
257 virtual dom::cache::PCacheParent* AllocPCacheParent() override;
259 virtual bool DeallocPCacheParent(dom::cache::PCacheParent* aActor) override;
261 virtual dom::cache::PCacheStreamControlParent*
262 AllocPCacheStreamControlParent() override;
264 virtual bool DeallocPCacheStreamControlParent(
265 dom::cache::PCacheStreamControlParent* aActor) override;
267 virtual PUDPSocketParent* AllocPUDPSocketParent(
268 const Maybe<PrincipalInfo>& pInfo, const nsCString& aFilter) override;
269 virtual mozilla::ipc::IPCResult RecvPUDPSocketConstructor(
270 PUDPSocketParent*, const Maybe<PrincipalInfo>& aPrincipalInfo,
271 const nsCString& aFilter) override;
272 virtual bool DeallocPUDPSocketParent(PUDPSocketParent*) override;
274 virtual PMessagePortParent* AllocPMessagePortParent(
275 const nsID& aUUID, const nsID& aDestinationUUID,
276 const uint32_t& aSequenceID) override;
278 virtual mozilla::ipc::IPCResult RecvPMessagePortConstructor(
279 PMessagePortParent* aActor, const nsID& aUUID,
280 const nsID& aDestinationUUID, const uint32_t& aSequenceID) override;
282 virtual bool DeallocPMessagePortParent(PMessagePortParent* aActor) override;
284 virtual mozilla::ipc::IPCResult RecvMessagePortForceClose(
285 const nsID& aUUID, const nsID& aDestinationUUID,
286 const uint32_t& aSequenceID) override;
288 virtual PQuotaParent* AllocPQuotaParent() override;
290 virtual bool DeallocPQuotaParent(PQuotaParent* aActor) override;
292 virtual mozilla::ipc::IPCResult RecvShutdownQuotaManager() override;
294 virtual already_AddRefed<PFileSystemRequestParent>
295 AllocPFileSystemRequestParent(const FileSystemParams&) override;
297 virtual mozilla::ipc::IPCResult RecvPFileSystemRequestConstructor(
298 PFileSystemRequestParent* actor, const FileSystemParams& params) override;
300 // Gamepad API Background IPC
301 virtual PGamepadEventChannelParent* AllocPGamepadEventChannelParent()
302 override;
304 virtual bool DeallocPGamepadEventChannelParent(
305 PGamepadEventChannelParent* aActor) override;
307 virtual PGamepadTestChannelParent* AllocPGamepadTestChannelParent() override;
309 virtual bool DeallocPGamepadTestChannelParent(
310 PGamepadTestChannelParent* aActor) override;
312 virtual PWebAuthnTransactionParent* AllocPWebAuthnTransactionParent()
313 override;
315 virtual bool DeallocPWebAuthnTransactionParent(
316 PWebAuthnTransactionParent* aActor) override;
318 virtual already_AddRefed<PHttpBackgroundChannelParent>
319 AllocPHttpBackgroundChannelParent(const uint64_t& aChannelId) override;
321 virtual mozilla::ipc::IPCResult RecvPHttpBackgroundChannelConstructor(
322 PHttpBackgroundChannelParent* aActor,
323 const uint64_t& aChannelId) override;
325 virtual PClientManagerParent* AllocPClientManagerParent() override;
327 virtual bool DeallocPClientManagerParent(
328 PClientManagerParent* aActor) override;
330 virtual mozilla::ipc::IPCResult RecvPClientManagerConstructor(
331 PClientManagerParent* aActor) override;
333 virtual PMIDIPortParent* AllocPMIDIPortParent(
334 const MIDIPortInfo& aPortInfo, const bool& aSysexEnabled) override;
336 virtual bool DeallocPMIDIPortParent(PMIDIPortParent* aActor) override;
338 virtual PMIDIManagerParent* AllocPMIDIManagerParent() override;
340 virtual bool DeallocPMIDIManagerParent(PMIDIManagerParent* aActor) override;
342 virtual mozilla::ipc::IPCResult RecvStorageActivity(
343 const PrincipalInfo& aPrincipalInfo) override;
345 virtual PServiceWorkerParent* AllocPServiceWorkerParent(
346 const IPCServiceWorkerDescriptor&) override;
348 virtual bool DeallocPServiceWorkerParent(PServiceWorkerParent*) override;
350 virtual mozilla::ipc::IPCResult RecvPServiceWorkerConstructor(
351 PServiceWorkerParent* aActor,
352 const IPCServiceWorkerDescriptor& aDescriptor) override;
354 virtual PServiceWorkerContainerParent* AllocPServiceWorkerContainerParent()
355 override;
357 virtual bool DeallocPServiceWorkerContainerParent(
358 PServiceWorkerContainerParent*) override;
360 virtual mozilla::ipc::IPCResult RecvPServiceWorkerContainerConstructor(
361 PServiceWorkerContainerParent* aActor) override;
363 virtual PServiceWorkerRegistrationParent*
364 AllocPServiceWorkerRegistrationParent(
365 const IPCServiceWorkerRegistrationDescriptor&) override;
367 virtual bool DeallocPServiceWorkerRegistrationParent(
368 PServiceWorkerRegistrationParent*) override;
370 virtual mozilla::ipc::IPCResult RecvPServiceWorkerRegistrationConstructor(
371 PServiceWorkerRegistrationParent* aActor,
372 const IPCServiceWorkerRegistrationDescriptor& aDescriptor) override;
374 virtual PEndpointForReportParent* AllocPEndpointForReportParent(
375 const nsString& aGroupName, const PrincipalInfo& aPrincipalInfo) override;
377 virtual mozilla::ipc::IPCResult RecvPEndpointForReportConstructor(
378 PEndpointForReportParent* actor, const nsString& aGroupName,
379 const PrincipalInfo& aPrincipalInfo) override;
381 virtual bool DeallocPEndpointForReportParent(
382 PEndpointForReportParent* aActor) override;
384 virtual mozilla::ipc::IPCResult RecvRemoveEndpoint(
385 const nsString& aGroupName, const nsCString& aEndpointURL,
386 const PrincipalInfo& aPrincipalInfo) override;
388 virtual dom::PMediaTransportParent* AllocPMediaTransportParent() override;
389 virtual bool DeallocPMediaTransportParent(
390 dom::PMediaTransportParent* aActor) override;
393 } // namespace ipc
394 } // namespace mozilla
396 #endif // mozilla_ipc_backgroundparentimpl_h__