2013-11-27 11:59:41 +04:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
|
|
2014-09-27 03:21:57 +04:00
|
|
|
include protocol PBackgroundIDBFactory;
|
2015-11-22 12:44:33 +03:00
|
|
|
include protocol PBackgroundIndexedDBUtils;
|
2018-08-20 15:33:03 +03:00
|
|
|
include protocol PBackgroundSDBConnection;
|
2018-11-29 23:48:41 +03:00
|
|
|
include protocol PBackgroundLSDatabase;
|
2018-11-29 23:47:45 +03:00
|
|
|
include protocol PBackgroundLSObserver;
|
2018-11-29 23:47:20 +03:00
|
|
|
include protocol PBackgroundLSRequest;
|
2018-11-29 23:48:15 +03:00
|
|
|
include protocol PBackgroundLSSimpleRequest;
|
2018-07-14 09:34:14 +03:00
|
|
|
include protocol PBackgroundLocalStorageCache;
|
2017-08-08 23:56:49 +03:00
|
|
|
include protocol PBackgroundStorage;
|
2013-11-27 11:59:41 +04:00
|
|
|
include protocol PBackgroundTest;
|
2015-01-15 19:58:40 +03:00
|
|
|
include protocol PBroadcastChannel;
|
2015-03-02 16:20:00 +03:00
|
|
|
include protocol PCache;
|
|
|
|
include protocol PCacheStorage;
|
|
|
|
include protocol PCacheStreamControl;
|
2017-11-01 20:19:38 +03:00
|
|
|
include protocol PClientManager;
|
2018-12-01 23:26:09 +03:00
|
|
|
include protocol PEndpointForReport;
|
2014-09-27 03:21:57 +04:00
|
|
|
include protocol PFileDescriptorSet;
|
2016-04-09 21:17:02 +03:00
|
|
|
include protocol PFileSystemRequest;
|
2016-06-28 01:25:00 +03:00
|
|
|
include protocol PGamepadEventChannel;
|
2016-06-28 01:26:00 +03:00
|
|
|
include protocol PGamepadTestChannel;
|
2017-05-15 11:01:10 +03:00
|
|
|
include protocol PHttpBackgroundChannel;
|
2019-09-24 17:33:57 +03:00
|
|
|
include protocol PIdleScheduler;
|
Bug 1353629 - PBlob refactoring - part 4 - IPCBlobInputStream, r=smaug
IPCBlobInputStream is a new type of nsIInputStream that is used only in content
process when a Blob is sent from parent to child. This inputStream is for now,
just cloneable.
When the parent process sends a Blob to a content process, it has the Blob and
its inputStream. With its inputStream it creates a IPCBlobInputStreamParent
actor. This actor keeps the inputStream alive for following uses (not part of
this patch).
On the child side we will have, of course, a IPCBlobInputStreamChild actor.
This actor is able to create a IPCBlobInputStream when CreateStream() is
called. This means that 1 IPCBlobInputStreamChild can manage multiple
IPCBlobInputStreams each time one of them is cloned. When the last one of this
stream is released, the child actor sends a __delete__ request to the parent
side; the parent will be deleted, and the original inputStream, on the parent
side, will be released as well.
IPCBlobInputStream is a special inputStream because each method, except for
Available() fails. Basically, this inputStream cannot be used on the content
process for nothing else than knowing the size of the original stream.
In the following patches, I'll introduce an async way to use it.
2017-04-24 13:09:40 +03:00
|
|
|
include protocol PIPCBlobInputStream;
|
2019-07-15 18:49:30 +03:00
|
|
|
include protocol PMediaTransport;
|
2017-05-09 23:35:27 +03:00
|
|
|
include protocol PPendingIPCBlob;
|
2018-11-20 02:18:32 +03:00
|
|
|
include protocol PRemoteWorker;
|
2019-08-15 20:26:49 +03:00
|
|
|
include protocol PRemoteWorkerController;
|
2018-11-20 02:18:32 +03:00
|
|
|
include protocol PRemoteWorkerService;
|
2018-11-20 02:18:20 +03:00
|
|
|
include protocol PSharedWorker;
|
2017-10-05 08:41:42 +03:00
|
|
|
include protocol PTemporaryIPCBlob;
|
2019-04-26 20:53:07 +03:00
|
|
|
include protocol PFileCreator;
|
2015-06-17 13:44:27 +03:00
|
|
|
include protocol PMessagePort;
|
2015-08-31 15:51:29 +03:00
|
|
|
include protocol PCameras;
|
2017-11-15 09:16:18 +03:00
|
|
|
include protocol PMIDIManager;
|
|
|
|
include protocol PMIDIPort;
|
2015-11-22 12:43:55 +03:00
|
|
|
include protocol PQuota;
|
2017-03-14 14:28:58 +03:00
|
|
|
include protocol PChildToParentStream;
|
2017-03-14 14:29:43 +03:00
|
|
|
include protocol PParentToChildStream;
|
2018-07-10 02:02:39 +03:00
|
|
|
include protocol PServiceWorker;
|
|
|
|
include protocol PServiceWorkerContainer;
|
2015-06-04 21:51:57 +03:00
|
|
|
include protocol PServiceWorkerManager;
|
2018-07-10 02:02:39 +03:00
|
|
|
include protocol PServiceWorkerRegistration;
|
2017-04-20 02:19:28 +03:00
|
|
|
include protocol PWebAuthnTransaction;
|
2015-05-29 17:14:14 +03:00
|
|
|
include protocol PUDPSocket;
|
|
|
|
include protocol PVsync;
|
2014-09-27 03:21:57 +04:00
|
|
|
|
|
|
|
include DOMTypes;
|
2017-05-09 23:35:27 +03:00
|
|
|
include IPCBlob;
|
2018-07-10 02:02:39 +03:00
|
|
|
include IPCServiceWorkerDescriptor;
|
|
|
|
include IPCServiceWorkerRegistrationDescriptor;
|
2018-11-29 23:47:20 +03:00
|
|
|
include PBackgroundLSSharedTypes;
|
2015-01-15 19:58:40 +03:00
|
|
|
include PBackgroundSharedTypes;
|
2014-10-16 08:56:52 +04:00
|
|
|
include PBackgroundIDBSharedTypes;
|
2016-04-09 21:17:02 +03:00
|
|
|
include PFileSystemParams;
|
2016-05-18 01:01:25 +03:00
|
|
|
include ProtocolTypes;
|
2018-11-20 02:18:32 +03:00
|
|
|
include RemoteWorkerTypes;
|
2017-11-15 09:16:18 +03:00
|
|
|
include MIDITypes;
|
2014-09-27 03:21:57 +04:00
|
|
|
|
2015-03-02 16:20:00 +03:00
|
|
|
include "mozilla/dom/cache/IPCUtils.h";
|
2018-07-10 02:02:39 +03:00
|
|
|
include "mozilla/layers/LayersMessageUtils.h";
|
2015-03-02 16:20:00 +03:00
|
|
|
|
2015-08-29 08:45:04 +03:00
|
|
|
using mozilla::dom::cache::Namespace
|
|
|
|
from "mozilla/dom/cache/Types.h";
|
|
|
|
|
2013-11-27 11:59:41 +04:00
|
|
|
namespace mozilla {
|
|
|
|
namespace ipc {
|
|
|
|
|
2014-09-27 03:21:57 +04:00
|
|
|
sync protocol PBackground
|
2013-11-27 11:59:41 +04:00
|
|
|
{
|
2014-09-27 03:21:57 +04:00
|
|
|
manages PBackgroundIDBFactory;
|
2015-11-22 12:44:33 +03:00
|
|
|
manages PBackgroundIndexedDBUtils;
|
2018-08-20 15:33:03 +03:00
|
|
|
manages PBackgroundSDBConnection;
|
2018-11-29 23:48:41 +03:00
|
|
|
manages PBackgroundLSDatabase;
|
2018-11-29 23:47:45 +03:00
|
|
|
manages PBackgroundLSObserver;
|
2018-11-29 23:47:20 +03:00
|
|
|
manages PBackgroundLSRequest;
|
2018-11-29 23:48:15 +03:00
|
|
|
manages PBackgroundLSSimpleRequest;
|
2018-07-14 09:34:14 +03:00
|
|
|
manages PBackgroundLocalStorageCache;
|
2017-08-08 23:56:49 +03:00
|
|
|
manages PBackgroundStorage;
|
2013-11-27 11:59:41 +04:00
|
|
|
manages PBackgroundTest;
|
2015-01-15 19:58:40 +03:00
|
|
|
manages PBroadcastChannel;
|
2015-03-02 16:20:00 +03:00
|
|
|
manages PCache;
|
|
|
|
manages PCacheStorage;
|
|
|
|
manages PCacheStreamControl;
|
2017-11-01 20:19:38 +03:00
|
|
|
manages PClientManager;
|
2018-12-01 23:26:09 +03:00
|
|
|
manages PEndpointForReport;
|
2014-09-27 03:21:57 +04:00
|
|
|
manages PFileDescriptorSet;
|
2016-04-09 21:17:02 +03:00
|
|
|
manages PFileSystemRequest;
|
2016-06-28 01:25:00 +03:00
|
|
|
manages PGamepadEventChannel;
|
2016-06-28 01:26:00 +03:00
|
|
|
manages PGamepadTestChannel;
|
2017-05-15 11:01:10 +03:00
|
|
|
manages PHttpBackgroundChannel;
|
2019-09-24 17:33:57 +03:00
|
|
|
manages PIdleScheduler;
|
Bug 1353629 - PBlob refactoring - part 4 - IPCBlobInputStream, r=smaug
IPCBlobInputStream is a new type of nsIInputStream that is used only in content
process when a Blob is sent from parent to child. This inputStream is for now,
just cloneable.
When the parent process sends a Blob to a content process, it has the Blob and
its inputStream. With its inputStream it creates a IPCBlobInputStreamParent
actor. This actor keeps the inputStream alive for following uses (not part of
this patch).
On the child side we will have, of course, a IPCBlobInputStreamChild actor.
This actor is able to create a IPCBlobInputStream when CreateStream() is
called. This means that 1 IPCBlobInputStreamChild can manage multiple
IPCBlobInputStreams each time one of them is cloned. When the last one of this
stream is released, the child actor sends a __delete__ request to the parent
side; the parent will be deleted, and the original inputStream, on the parent
side, will be released as well.
IPCBlobInputStream is a special inputStream because each method, except for
Available() fails. Basically, this inputStream cannot be used on the content
process for nothing else than knowing the size of the original stream.
In the following patches, I'll introduce an async way to use it.
2017-04-24 13:09:40 +03:00
|
|
|
manages PIPCBlobInputStream;
|
2019-07-15 18:49:30 +03:00
|
|
|
manages PMediaTransport;
|
2017-05-09 23:35:27 +03:00
|
|
|
manages PPendingIPCBlob;
|
2018-11-20 02:18:32 +03:00
|
|
|
manages PRemoteWorker;
|
2019-08-15 20:26:49 +03:00
|
|
|
manages PRemoteWorkerController;
|
2018-11-20 02:18:32 +03:00
|
|
|
manages PRemoteWorkerService;
|
2018-11-20 02:18:20 +03:00
|
|
|
manages PSharedWorker;
|
2017-10-05 08:41:42 +03:00
|
|
|
manages PTemporaryIPCBlob;
|
2019-04-26 20:53:07 +03:00
|
|
|
manages PFileCreator;
|
2015-06-17 13:44:27 +03:00
|
|
|
manages PMessagePort;
|
2015-08-31 15:51:29 +03:00
|
|
|
manages PCameras;
|
2017-11-15 09:16:18 +03:00
|
|
|
manages PMIDIManager;
|
|
|
|
manages PMIDIPort;
|
2015-11-22 12:43:55 +03:00
|
|
|
manages PQuota;
|
2017-03-14 14:28:58 +03:00
|
|
|
manages PChildToParentStream;
|
2017-03-14 14:29:43 +03:00
|
|
|
manages PParentToChildStream;
|
2018-07-10 02:02:39 +03:00
|
|
|
manages PServiceWorker;
|
|
|
|
manages PServiceWorkerContainer;
|
2015-06-04 21:51:57 +03:00
|
|
|
manages PServiceWorkerManager;
|
2018-07-10 02:02:39 +03:00
|
|
|
manages PServiceWorkerRegistration;
|
2017-04-20 02:19:28 +03:00
|
|
|
manages PWebAuthnTransaction;
|
2015-05-29 17:14:14 +03:00
|
|
|
manages PUDPSocket;
|
|
|
|
manages PVsync;
|
2013-11-27 11:59:41 +04:00
|
|
|
|
|
|
|
parent:
|
|
|
|
// Only called at startup during mochitests to check the basic infrastructure.
|
2016-01-27 00:51:53 +03:00
|
|
|
async PBackgroundTest(nsCString testArg);
|
2014-09-27 03:21:57 +04:00
|
|
|
|
2016-01-27 00:51:53 +03:00
|
|
|
async PBackgroundIDBFactory(LoggingInfo loggingInfo);
|
2014-09-27 03:21:57 +04:00
|
|
|
|
2016-01-27 00:51:53 +03:00
|
|
|
async PBackgroundIndexedDBUtils();
|
2015-11-22 12:44:33 +03:00
|
|
|
|
2016-02-10 18:11:25 +03:00
|
|
|
// Use only for testing!
|
|
|
|
async FlushPendingFileDeletions();
|
|
|
|
|
2018-08-20 15:33:03 +03:00
|
|
|
async PBackgroundSDBConnection(PrincipalInfo principalInfo);
|
|
|
|
|
2018-11-29 23:48:41 +03:00
|
|
|
async PBackgroundLSDatabase(PrincipalInfo principalInfo,
|
|
|
|
uint32_t privateBrowsingId,
|
|
|
|
uint64_t datastoreId);
|
2018-11-29 23:47:45 +03:00
|
|
|
|
|
|
|
async PBackgroundLSObserver(uint64_t observerId);
|
2018-11-29 23:47:20 +03:00
|
|
|
|
2018-11-05 22:04:39 +03:00
|
|
|
/**
|
|
|
|
* Issue an asynchronous request that will be used in a synchronous fashion
|
|
|
|
* through complex machinations described in `PBackgroundLSRequest.ipdl` and
|
|
|
|
* `LSObject.h`.
|
|
|
|
*/
|
2018-11-29 23:47:20 +03:00
|
|
|
async PBackgroundLSRequest(LSRequestParams params);
|
|
|
|
|
2018-11-05 22:04:39 +03:00
|
|
|
/**
|
|
|
|
* Issues a simple, non-cancelable asynchronous request that's used in an
|
|
|
|
* asynchronous fashion by callers. (LSRequest is not simple because it used
|
|
|
|
* in a synchronous fashion which leads to complexities regarding cancelation,
|
|
|
|
* see `PBackgroundLSRequest.ipdl` for details.)
|
|
|
|
*/
|
2018-11-29 23:48:15 +03:00
|
|
|
async PBackgroundLSSimpleRequest(LSSimpleRequestParams params);
|
|
|
|
|
2019-02-07 21:51:16 +03:00
|
|
|
/**
|
|
|
|
* Asynchronously propagates the "last-pb-context-exited" observer
|
|
|
|
* notification to LocalStorage NextGen implementation so it can clear
|
|
|
|
* retained private-browsing in-memory Datastores. Using a (same-process)
|
|
|
|
* IPC message avoids the need for the main-thread nsIObserver to have a
|
|
|
|
* reference to the PBackground thread and directly dispatch a runnable to it.
|
|
|
|
*/
|
|
|
|
async LSClearPrivateBrowsing();
|
|
|
|
|
2018-07-14 09:34:14 +03:00
|
|
|
async PBackgroundLocalStorageCache(PrincipalInfo principalInfo,
|
|
|
|
nsCString originKey,
|
|
|
|
uint32_t privateBrowsingId);
|
2017-08-08 23:56:49 +03:00
|
|
|
|
2018-07-14 09:34:14 +03:00
|
|
|
async PBackgroundStorage(nsString profilePath);
|
2017-08-09 00:02:28 +03:00
|
|
|
|
2016-01-27 00:51:53 +03:00
|
|
|
async PVsync();
|
2015-01-14 02:37:00 +03:00
|
|
|
|
2016-01-27 00:51:53 +03:00
|
|
|
async PCameras();
|
2015-08-31 15:51:29 +03:00
|
|
|
|
2019-03-05 17:41:42 +03:00
|
|
|
async PUDPSocket(PrincipalInfo? pInfo, nsCString filter);
|
2016-06-07 14:50:00 +03:00
|
|
|
async PBroadcastChannel(PrincipalInfo pInfo, nsCString origin, nsString channel);
|
2015-01-15 19:58:40 +03:00
|
|
|
|
2016-01-27 00:51:53 +03:00
|
|
|
async PServiceWorkerManager();
|
2015-06-04 21:51:57 +03:00
|
|
|
|
2016-01-27 00:51:53 +03:00
|
|
|
async ShutdownServiceWorkerRegistrar();
|
2015-02-11 14:53:00 +03:00
|
|
|
|
2016-01-27 00:51:53 +03:00
|
|
|
async PCacheStorage(Namespace aNamespace, PrincipalInfo aPrincipalInfo);
|
2015-03-02 16:20:00 +03:00
|
|
|
|
2016-01-27 00:51:53 +03:00
|
|
|
async PMessagePort(nsID uuid, nsID destinationUuid, uint32_t sequenceId);
|
2015-06-17 13:44:27 +03:00
|
|
|
|
2017-03-14 14:28:58 +03:00
|
|
|
async PChildToParentStream();
|
2016-05-15 20:32:09 +03:00
|
|
|
|
2016-01-27 00:51:53 +03:00
|
|
|
async MessagePortForceClose(nsID uuid, nsID destinationUuid, uint32_t sequenceId);
|
2015-06-24 01:50:00 +03:00
|
|
|
|
2016-01-27 00:51:53 +03:00
|
|
|
async PQuota();
|
2015-11-22 12:43:55 +03:00
|
|
|
|
2019-02-23 19:30:41 +03:00
|
|
|
async ShutdownQuotaManager();
|
|
|
|
|
2016-04-09 21:17:02 +03:00
|
|
|
async PFileSystemRequest(FileSystemParams params);
|
|
|
|
|
2016-06-28 01:25:00 +03:00
|
|
|
async PGamepadEventChannel();
|
|
|
|
|
2016-06-28 01:26:00 +03:00
|
|
|
async PGamepadTestChannel();
|
|
|
|
|
2017-05-15 11:01:10 +03:00
|
|
|
async PHttpBackgroundChannel(uint64_t channelId);
|
|
|
|
|
2017-04-20 02:19:28 +03:00
|
|
|
async PWebAuthnTransaction();
|
|
|
|
|
2018-11-20 02:18:33 +03:00
|
|
|
async PSharedWorker(RemoteWorkerData data,
|
|
|
|
uint64_t windowID,
|
|
|
|
MessagePortIdentifier portIdentifier);
|
2018-11-20 02:18:20 +03:00
|
|
|
|
2017-10-05 08:41:42 +03:00
|
|
|
async PTemporaryIPCBlob();
|
|
|
|
|
2019-04-26 20:53:07 +03:00
|
|
|
async PFileCreator(nsString aFullPath, nsString aType, nsString aName,
|
|
|
|
int64_t? lastModified, bool aExistenceCheck,
|
|
|
|
bool aIsFromNsIFile);
|
|
|
|
|
2017-11-01 20:19:38 +03:00
|
|
|
async PClientManager();
|
|
|
|
|
2017-11-15 09:16:18 +03:00
|
|
|
async PMIDIManager();
|
|
|
|
async PMIDIPort(MIDIPortInfo portInfo, bool sysexEnabled);
|
|
|
|
|
2018-04-18 19:19:10 +03:00
|
|
|
// This method is used to propagate storage activities from the child actor
|
|
|
|
// to the parent actor. See StorageActivityService.
|
|
|
|
async StorageActivity(PrincipalInfo principalInfo);
|
|
|
|
|
2018-07-10 02:02:39 +03:00
|
|
|
async PServiceWorker(IPCServiceWorkerDescriptor aDescriptor);
|
|
|
|
|
2019-08-15 20:26:49 +03:00
|
|
|
async PRemoteWorkerController(RemoteWorkerData aData);
|
|
|
|
|
2018-11-20 02:18:32 +03:00
|
|
|
async PRemoteWorkerService();
|
|
|
|
|
2018-07-10 02:02:39 +03:00
|
|
|
async PServiceWorkerContainer();
|
|
|
|
|
|
|
|
async PServiceWorkerRegistration(IPCServiceWorkerRegistrationDescriptor aDescriptor);
|
|
|
|
|
2018-12-01 23:26:09 +03:00
|
|
|
async PEndpointForReport(nsString aGroupName, PrincipalInfo aPrincipalInfo);
|
|
|
|
|
2018-12-01 23:26:09 +03:00
|
|
|
async RemoveEndpoint(nsString aGroupName, nsCString aEndpointURL,
|
|
|
|
PrincipalInfo aPrincipalInfo);
|
|
|
|
|
2019-09-24 17:33:57 +03:00
|
|
|
async PIdleScheduler();
|
|
|
|
|
2019-07-15 18:49:30 +03:00
|
|
|
async PMediaTransport();
|
|
|
|
|
2015-03-02 16:20:00 +03:00
|
|
|
child:
|
2016-01-27 00:51:53 +03:00
|
|
|
async PCache();
|
|
|
|
async PCacheStreamControl();
|
2015-03-02 16:20:00 +03:00
|
|
|
|
2017-03-14 14:29:43 +03:00
|
|
|
async PParentToChildStream();
|
|
|
|
|
2017-05-09 23:35:27 +03:00
|
|
|
async PPendingIPCBlob(IPCBlob blob);
|
|
|
|
|
2018-11-20 02:18:32 +03:00
|
|
|
async PRemoteWorker(RemoteWorkerData data);
|
2019-04-26 20:53:07 +03:00
|
|
|
|
2014-09-27 03:21:57 +04:00
|
|
|
both:
|
2017-05-31 08:41:10 +03:00
|
|
|
// PIPCBlobInputStream is created on the parent side only if the child starts
|
|
|
|
// a migration.
|
|
|
|
async PIPCBlobInputStream(nsID aID, uint64_t aSize);
|
|
|
|
|
2016-01-27 00:51:53 +03:00
|
|
|
async PFileDescriptorSet(FileDescriptor fd);
|
2013-11-27 11:59:41 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace ipc
|
|
|
|
} // namespace mozilla
|