Bug 1853814 [wpt PR 42017] - LoAF: Expose script URL for promise resolvers, a=testonly
[gecko.git] / dom / quota / PQuota.ipdl
blob7302ada6121e0de2f0f6e0f3da79c3c569a12c87
1 /* This Source Code Form is subject to the terms of the Mozilla Public
2  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
3  * You can obtain one at http://mozilla.org/MPL/2.0/. */
5 include protocol PBackground;
6 include protocol PQuotaRequest;
7 include protocol PQuotaUsageRequest;
9 include PBackgroundSharedTypes;
11 include "mozilla/dom/quota/SerializationHelpers.h";
13 using mozilla::OriginAttributesPattern
14   from "mozilla/OriginAttributes.h";
16 using mozilla::dom::quota::PersistenceType
17   from "mozilla/dom/quota/PersistenceType.h";
19 using mozilla::dom::quota::Client::Type
20   from "mozilla/dom/quota/Client.h";
22 using mozilla::dom::ContentParentId
23   from "mozilla/dom/ipc/IdType.h";
25 namespace mozilla {
27 namespace ipc {
29 union BoolResponse
31   nsresult;
32   bool;
35 } // namespace ipc
37 namespace dom {
38 namespace quota {
40 struct StorageNameParams
44 struct StorageInitializedParams
48 struct TemporaryStorageInitializedParams
52 struct InitTemporaryStorageParams
56 struct InitializePersistentOriginParams
58   PrincipalInfo principalInfo;
61 struct InitializeTemporaryOriginParams
63   PersistenceType persistenceType;
64   PrincipalInfo principalInfo;
67 struct GetFullOriginMetadataParams
69   PersistenceType persistenceType;
70   PrincipalInfo principalInfo;
73 struct AllUsageParams
75   bool getAll;
78 struct OriginUsageParams
80   PrincipalInfo principalInfo;
81   bool fromMemory;
84 union UsageRequestParams
86   AllUsageParams;
87   OriginUsageParams;
90 struct ClearResetOriginParams
92   PrincipalInfo principalInfo;
93   PersistenceType persistenceType;
94   bool persistenceTypeIsExplicit;
95   Type clientType;
96   bool clientTypeIsExplicit;
99 struct ResetOriginParams
101   ClearResetOriginParams commonParams;
104 struct PersistedParams
106   PrincipalInfo principalInfo;
109 struct PersistParams
111   PrincipalInfo principalInfo;
114 struct EstimateParams
116   PrincipalInfo principalInfo;
119 struct ListOriginsParams
123 union RequestParams
125   StorageNameParams;
126   StorageInitializedParams;
127   TemporaryStorageInitializedParams;
128   InitTemporaryStorageParams;
129   InitializePersistentOriginParams;
130   InitializeTemporaryOriginParams;
131   GetFullOriginMetadataParams;
132   ResetOriginParams;
133   PersistedParams;
134   PersistParams;
135   EstimateParams;
136   ListOriginsParams;
139 [ManualDealloc, ChildImpl=virtual, ParentImpl=virtual]
140 protocol PQuota
142   manager PBackground;
144   manages PQuotaRequest;
145   manages PQuotaUsageRequest;
147 parent:
148   async __delete__();
150   async PQuotaUsageRequest(UsageRequestParams params);
152   async PQuotaRequest(RequestParams params);
154   async InitializeStorage()
155       returns(BoolResponse response);
157   async ClearStoragesForOrigin(PersistenceType? persistenceType,
158                                PrincipalInfo principalInfo,
159                                Type? clientType)
160       returns(BoolResponse response);
162   async ClearStoragesForOriginPrefix(PersistenceType? persistenceType,
163                                      PrincipalInfo principalInfo)
164       returns(BoolResponse response);
166   // This can only be called from some other thread in the parent process!
167   async ClearStoragesForOriginAttributesPattern(OriginAttributesPattern pattern)
168       returns(BoolResponse response);
170   async ClearStoragesForPrivateBrowsing()
171       returns(BoolResponse response);
173   async ClearStorage()
174       returns(BoolResponse response);
176   async ShutdownStorage()
177       returns(BoolResponse response);
179   async StartIdleMaintenance();
181   async StopIdleMaintenance();
183   async AbortOperationsForProcess(ContentParentId contentParentId);
186 } // namespace quota
187 } // namespace dom
188 } // namespace mozilla