diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 09:22:09 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 09:22:09 +0000 |
commit | 43a97878ce14b72f0981164f87f2e35e14151312 (patch) | |
tree | 620249daf56c0258faa40cbdcf9cfba06de2a846 /ipc/glue/PBackground.ipdl | |
parent | Initial commit. (diff) | |
download | firefox-43a97878ce14b72f0981164f87f2e35e14151312.tar.xz firefox-43a97878ce14b72f0981164f87f2e35e14151312.zip |
Adding upstream version 110.0.1.upstream/110.0.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'ipc/glue/PBackground.ipdl')
-rw-r--r-- | ipc/glue/PBackground.ipdl | 333 |
1 files changed, 333 insertions, 0 deletions
diff --git a/ipc/glue/PBackground.ipdl b/ipc/glue/PBackground.ipdl new file mode 100644 index 0000000000..99b90e137c --- /dev/null +++ b/ipc/glue/PBackground.ipdl @@ -0,0 +1,333 @@ +/* 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/. */ + +include protocol PBackgroundDataBridge; +include protocol PBackgroundIDBFactory; +include protocol PBackgroundIndexedDBUtils; +include protocol PBackgroundSDBConnection; +include protocol PBackgroundLSDatabase; +include protocol PBackgroundLSObserver; +include protocol PBackgroundLSRequest; +include protocol PBackgroundLSSimpleRequest; +include protocol PBackgroundLocalStorageCache; +include protocol PBackgroundSessionStorageManager; +include protocol PBackgroundSessionStorageService; +include protocol PBackgroundStorage; +include protocol PBackgroundTest; +include protocol PBroadcastChannel; +include protocol PCache; +include protocol PCacheStorage; +include protocol PCacheStreamControl; +include protocol PClientManager; +include protocol PEndpointForReport; +include protocol PFileSystemManager; +include protocol PFileSystemRequest; +include protocol PGamepadEventChannel; +include protocol PGamepadTestChannel; +include protocol PHttpBackgroundChannel; +include protocol PIPCClientCerts; +include protocol PIdleScheduler; +include protocol PMediaTransport; +include protocol PRemoteWorker; +include protocol PRemoteWorkerController; +include protocol PRemoteWorkerService; +include protocol PSharedWorker; +include protocol PTemporaryIPCBlob; +include protocol PFileCreator; +include protocol PMessagePort; +include protocol PCameras; +include protocol PLockManager; +include protocol PMIDIManager; +include protocol PMIDIPort; +include protocol PQuota; +include protocol PSelectTLSClientAuthCert; +include protocol PServiceWorker; +include protocol PServiceWorkerContainer; +include protocol PServiceWorkerManager; +include protocol PServiceWorkerRegistration; +include protocol PWebAuthnTransaction; +include protocol PUDPSocket; +include protocol PVerifySSLServerCert; +include protocol PVsync; +include protocol PRemoteDecoderManager; +include protocol PWebSocketConnection; +include protocol PWebTransport; + +include DOMTypes; +include IPCBlob; +include IPCServiceWorkerDescriptor; +include IPCServiceWorkerRegistrationDescriptor; +include PBackgroundLSSharedTypes; +include PBackgroundSharedTypes; +include PBackgroundIDBSharedTypes; +include PFileSystemParams; +include ProtocolTypes; +include PSMIPCTypes; +include RemoteWorkerTypes; +include MIDITypes; + +include "mozilla/dom/cache/IPCUtils.h"; +include "mozilla/dom/quota/SerializationHelpers.h"; +include "mozilla/dom/PermissionMessageUtils.h"; +include "mozilla/layers/LayersMessageUtils.h"; + +using mozilla::dom::cache::Namespace + from "mozilla/dom/cache/Types.h"; + +using class mozilla::dom::SSCacheCopy from "mozilla/dom/PBackgroundSessionStorageCache.h"; + +using mozilla::RemoteDecodeIn from "mozilla/RemoteDecoderManagerChild.h"; + +namespace mozilla { +namespace ipc { + +[NeedsOtherPid, ChildImpl=virtual, ParentImpl=virtual] +sync protocol PBackground +{ + manages PBackgroundDataBridge; + manages PBackgroundIDBFactory; + manages PBackgroundIndexedDBUtils; + manages PBackgroundSDBConnection; + manages PBackgroundLSDatabase; + manages PBackgroundLSObserver; + manages PBackgroundLSRequest; + manages PBackgroundLSSimpleRequest; + manages PBackgroundLocalStorageCache; + manages PBackgroundSessionStorageManager; + manages PBackgroundSessionStorageService; + manages PBackgroundStorage; + manages PBackgroundTest; + manages PBroadcastChannel; + manages PCache; + manages PCacheStorage; + manages PCacheStreamControl; + manages PClientManager; + manages PEndpointForReport; + manages PFileSystemRequest; + manages PGamepadEventChannel; + manages PGamepadTestChannel; + manages PHttpBackgroundChannel; + manages PIPCClientCerts; + manages PIdleScheduler; + manages PLockManager; + manages PMediaTransport; + manages PRemoteWorker; + manages PRemoteWorkerController; + manages PRemoteWorkerService; + manages PSharedWorker; + manages PTemporaryIPCBlob; + manages PFileCreator; + manages PMessagePort; + manages PCameras; + manages PQuota; + manages PSelectTLSClientAuthCert; + manages PServiceWorker; + manages PServiceWorkerContainer; + manages PServiceWorkerManager; + manages PServiceWorkerRegistration; + manages PWebAuthnTransaction; + manages PWebSocketConnection; + manages PUDPSocket; + manages PVerifySSLServerCert; + manages PVsync; + +parent: + // Only called at startup during mochitests to check the basic infrastructure. + async PBackgroundTest(nsCString testArg); + + async PBackgroundDataBridge(uint64_t channelID); + + async PBackgroundIDBFactory(LoggingInfo loggingInfo); + + async PBackgroundIndexedDBUtils(); + + // Use only for testing! + async FlushPendingFileDeletions(); + + async PBackgroundSDBConnection(PersistenceType persistenceType, + PrincipalInfo principalInfo); + + async PBackgroundLSDatabase(PrincipalInfo principalInfo, + uint32_t privateBrowsingId, + uint64_t datastoreId); + + async PBackgroundLSObserver(uint64_t observerId); + + /** + * Issue an asynchronous request that will be used in a synchronous fashion + * through complex machinations described in `PBackgroundLSRequest.ipdl` and + * `LSObject.h`. + */ + async PBackgroundLSRequest(LSRequestParams params); + + /** + * 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.) + */ + async PBackgroundLSSimpleRequest(LSSimpleRequestParams params); + + /** + * 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(); + + async PBackgroundLocalStorageCache(PrincipalInfo principalInfo, + nsCString originKey, + uint32_t privateBrowsingId); + + async PBackgroundSessionStorageManager(uint64_t aTopContextId); + + async PBackgroundSessionStorageService(); + + async PBackgroundStorage(nsString profilePath, uint32_t privateBrowsingId); + + /** + * Finish the setup of a new PFileSystemManager top level protocol. + */ + async CreateFileSystemManagerParent( + PrincipalInfo principalInfo, + Endpoint<PFileSystemManagerParent> aParentEndpoint) + returns(nsresult rv); + + /** + * Finish the setup of a new PWebTransport top level protocol. + */ + async CreateWebTransportParent( + nsString aURL, + nsIPrincipal aPrincipal, + bool aDedicated, + bool aRequireUnreliable, + uint32_t aCongestionControl, + /* Sequence<WebTransportHash>* aServerCertHashes, */ + Endpoint<PWebTransportParent> aParentEndpoint) + returns(nsresult rv, uint8_t aReliability); // Actually WebTransportReliabityMode enum + + async PVsync(); + + async PCameras(); + + async PUDPSocket(PrincipalInfo? pInfo, nsCString filter); + async PBroadcastChannel(PrincipalInfo pInfo, nsCString origin, nsString channel); + + async PServiceWorkerManager(); + + async ShutdownServiceWorkerRegistrar(); + + async PCacheStorage(Namespace aNamespace, PrincipalInfo aPrincipalInfo); + + async PMessagePort(nsID uuid, nsID destinationUuid, uint32_t sequenceId); + + async MessagePortForceClose(nsID uuid, nsID destinationUuid, uint32_t sequenceId); + + async PQuota(); + + async ShutdownQuotaManager(); + + async ShutdownBackgroundSessionStorageManagers(); + + async PropagateBackgroundSessionStorageManager(uint64_t currentTopContextId, uint64_t targetTopContextId); + + async RemoveBackgroundSessionStorageManager(uint64_t topContextId); + + async GetSessionStorageManagerData( + uint64_t aTopContextId, uint32_t aSizeLimit, bool aCancelSessionStoreTimer) + returns(SSCacheCopy[] aCacheCopy); + + async LoadSessionStorageManagerData(uint64_t aTopContextId, SSCacheCopy[] aOriginCacheCopy); + + async PFileSystemRequest(FileSystemParams params); + + async PGamepadEventChannel(); + + async PGamepadTestChannel(); + + async PHttpBackgroundChannel(uint64_t channelId); + + async PWebAuthnTransaction(); + + async PSharedWorker(RemoteWorkerData data, + uint64_t windowID, + MessagePortIdentifier portIdentifier); + + async PTemporaryIPCBlob(); + + async PFileCreator(nsString aFullPath, nsString aType, nsString aName, + int64_t? lastModified, bool aExistenceCheck, + bool aIsFromNsIFile); + + async PClientManager(); + + async CreateMIDIManager(Endpoint<PMIDIManagerParent> aEndpoint); + async CreateMIDIPort(Endpoint<PMIDIPortParent> aEndpoint, + MIDIPortInfo portInfo, bool sysexEnabled); + async HasMIDIDevice() returns (bool hasDevice); + + // This method is used to propagate storage activities from the child actor + // to the parent actor. See StorageActivityService. + async StorageActivity(PrincipalInfo principalInfo); + + async PServiceWorker(IPCServiceWorkerDescriptor aDescriptor); + + async PRemoteWorkerController(RemoteWorkerData aData); + + async PRemoteWorkerService(); + + async PServiceWorkerContainer(); + + async PServiceWorkerRegistration(IPCServiceWorkerRegistrationDescriptor aDescriptor); + + async PEndpointForReport(nsString aGroupName, PrincipalInfo aPrincipalInfo); + + async RemoveEndpoint(nsString aGroupName, nsCString aEndpointURL, + PrincipalInfo aPrincipalInfo); + + async PIdleScheduler(); + + async PMediaTransport(); + + async PSelectTLSClientAuthCert(nsCString aHostName, + OriginAttributes aOriginAttributes, + int32_t aPort, + uint32_t aProviderFlags, + uint32_t aProviderTlsFlags, + ByteArray aServerCertBytes, + ByteArray[] aCANames); + + async PVerifySSLServerCert(ByteArray[] aPeerCertChain, + nsCString aHostName, + int32_t aPort, + OriginAttributes aOriginAttributes, + ByteArray? aStapledOCSPResponse, + ByteArray? aSctsFromTLSExtension, + DelegatedCredentialInfoArg? aDcInfo, + uint32_t aProviderFlags, + uint32_t aCertVerifierFlags); + + async EnsureRDDProcessAndCreateBridge() + returns (nsresult rv, Endpoint<PRemoteDecoderManagerChild> aEndpoint); + + async EnsureUtilityProcessAndCreateBridge(RemoteDecodeIn aLocation) + returns (nsresult rv, Endpoint<PRemoteDecoderManagerChild> aEndpoint); + + async PWebSocketConnection(uint32_t aListenerId); + + async PLockManager(ContentPrincipalInfo aPrincipalInfo, nsID aClientId); + + async PIPCClientCerts(); + +child: + async PCache(); + async PCacheStreamControl(); + + async PRemoteWorker(RemoteWorkerData data); +}; + +} // namespace ipc +} // namespace mozilla |