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/. */
|
|
|
|
|
2015-08-29 08:45:04 +03:00
|
|
|
include protocol PAsmJSCacheEntry;
|
2014-09-27 03:21:57 +04:00
|
|
|
include protocol PBackgroundIDBFactory;
|
2015-11-22 12:44:33 +03:00
|
|
|
include protocol PBackgroundIndexedDBUtils;
|
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;
|
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;
|
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;
|
2017-05-09 23:35:27 +03:00
|
|
|
include protocol PPendingIPCBlob;
|
2017-10-05 08:41:42 +03:00
|
|
|
include protocol PTemporaryIPCBlob;
|
2015-06-17 13:44:27 +03:00
|
|
|
include protocol PMessagePort;
|
2015-08-31 15:51:29 +03:00
|
|
|
include protocol PCameras;
|
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;
|
2015-06-04 21:51:57 +03:00
|
|
|
include protocol PServiceWorkerManager;
|
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;
|
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;
|
2014-09-27 03:21:57 +04:00
|
|
|
|
2015-03-02 16:20:00 +03:00
|
|
|
include "mozilla/dom/cache/IPCUtils.h";
|
|
|
|
|
2015-08-29 08:45:04 +03:00
|
|
|
using mozilla::dom::cache::Namespace
|
|
|
|
from "mozilla/dom/cache/Types.h";
|
|
|
|
|
|
|
|
using mozilla::dom::asmjscache::OpenMode
|
|
|
|
from "mozilla/dom/asmjscache/AsmJSCache.h";
|
|
|
|
|
|
|
|
using mozilla::dom::asmjscache::WriteParams
|
|
|
|
from "mozilla/dom/asmjscache/AsmJSCache.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
|
|
|
{
|
2015-08-29 08:45:04 +03:00
|
|
|
manages PAsmJSCacheEntry;
|
2014-09-27 03:21:57 +04:00
|
|
|
manages PBackgroundIDBFactory;
|
2015-11-22 12:44:33 +03:00
|
|
|
manages PBackgroundIndexedDBUtils;
|
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;
|
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;
|
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;
|
2017-05-09 23:35:27 +03:00
|
|
|
manages PPendingIPCBlob;
|
2017-10-05 08:41:42 +03:00
|
|
|
manages PTemporaryIPCBlob;
|
2015-06-17 13:44:27 +03:00
|
|
|
manages PMessagePort;
|
2015-08-31 15:51:29 +03:00
|
|
|
manages PCameras;
|
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;
|
2015-06-04 21:51:57 +03:00
|
|
|
manages PServiceWorkerManager;
|
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();
|
|
|
|
|
2017-08-09 00:01:52 +03:00
|
|
|
async PBackgroundStorage(nsString profilePath);
|
2017-08-08 23:56:49 +03:00
|
|
|
|
2017-08-09 00:02:28 +03:00
|
|
|
async BroadcastLocalStorageChange(nsString documentURI,
|
|
|
|
nsString key,
|
|
|
|
nsString oldValue,
|
|
|
|
nsString newValue,
|
|
|
|
PrincipalInfo principalInfo,
|
|
|
|
bool isPrivate);
|
|
|
|
|
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
|
|
|
|
2016-01-27 00:51:53 +03:00
|
|
|
async PUDPSocket(OptionalPrincipalInfo 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 PAsmJSCacheEntry(OpenMode openMode,
|
|
|
|
WriteParams write,
|
|
|
|
PrincipalInfo principalInfo);
|
2015-08-29 08:45:04 +03:00
|
|
|
|
2016-01-27 00:51:53 +03:00
|
|
|
async PQuota();
|
2015-11-22 12:43:55 +03:00
|
|
|
|
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();
|
|
|
|
|
2017-10-05 08:41:42 +03:00
|
|
|
async PTemporaryIPCBlob();
|
|
|
|
|
2017-11-01 20:19:38 +03:00
|
|
|
async PClientManager();
|
|
|
|
|
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);
|
|
|
|
|
2017-08-09 00:02:28 +03:00
|
|
|
async DispatchLocalStorageChange(nsString documentURI,
|
|
|
|
nsString key,
|
|
|
|
nsString oldValue,
|
|
|
|
nsString newValue,
|
|
|
|
PrincipalInfo principalInfo,
|
|
|
|
bool isPrivate);
|
|
|
|
|
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
|