Bug 1726269: part 1) Repeatedly call `::OleSetClipboard` for the Windows-specific...
[gecko.git] / dom / serviceworkers / ServiceWorkerOpArgs.ipdlh
blobe504ccd5996cbc25890a79ed52acaeddb3b060f7
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
3  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
5 include ChannelInfo;
6 include ClientIPCTypes;
7 include DOMTypes;
8 include FetchTypes;
10 include "mozilla/dom/ServiceWorkerIPCUtils.h";
12 using ServiceWorkerState from "mozilla/dom/ServiceWorkerBinding.h";
13 using class mozilla::TimeStamp from "mozilla/TimeStamp.h";
15 namespace mozilla {
16 namespace dom {
18 /**
19  * ServiceWorkerOpArgs
20  */
21 struct ServiceWorkerCheckScriptEvaluationOpArgs {};
23 struct ServiceWorkerUpdateStateOpArgs {
24   ServiceWorkerState state;
27 struct ServiceWorkerTerminateWorkerOpArgs {
28   uint32_t shutdownStateId;
31 struct ServiceWorkerLifeCycleEventOpArgs {
32   nsString eventName;
35 // Possibly need to differentiate an empty array from the absence of an array.
36 union OptionalPushData {
37   void_t;
38   uint8_t[];
41 struct ServiceWorkerPushEventOpArgs {
42   nsString messageId;
43   OptionalPushData data;
46 struct ServiceWorkerPushSubscriptionChangeEventOpArgs {};
48 struct ServiceWorkerNotificationEventOpArgs {
49   nsString eventName;
50   nsString id;
51   nsString title;
52   nsString dir;
53   nsString lang;
54   nsString body;
55   nsString tag;
56   nsString icon;
57   nsString data;
58   nsString behavior;
59   nsString scope;
60   uint32_t disableOpenClickDelay;
63 struct ServiceWorkerMessageEventOpArgs {
64   ClientInfoAndState clientInfoAndState;
65   ClonedOrErrorMessageData clonedData;
68 struct ServiceWorkerFetchEventOpArgs {
69   nsCString workerScriptSpec;
70   IPCInternalRequest internalRequest;
71   nsString clientId;
72   nsString resultingClientId;
73   bool isNonSubresourceRequest;
74   // Failure injection helper; non-NS_OK values indicate that the event, instead
75   // of dispatching should instead return a `CancelInterceptionArgs` response
76   // with this nsresult.  This value originates from
77   // `nsIServiceWorkerInfo::testingInjectCancellation`.
78   nsresult testingInjectCancellation;
81 union ServiceWorkerOpArgs {
82   ServiceWorkerCheckScriptEvaluationOpArgs;
83   ServiceWorkerUpdateStateOpArgs;
84   ServiceWorkerTerminateWorkerOpArgs;
85   ServiceWorkerLifeCycleEventOpArgs;
86   ServiceWorkerPushEventOpArgs;
87   ServiceWorkerPushSubscriptionChangeEventOpArgs;
88   ServiceWorkerNotificationEventOpArgs;
89   ServiceWorkerMessageEventOpArgs;
90   ServiceWorkerFetchEventOpArgs;
93 /**
94  * IPCFetchEventRespondWithResult
95  */
96 struct FetchEventRespondWithClosure {
97   nsCString respondWithScriptSpec;
98   uint32_t respondWithLineNumber;
99   uint32_t respondWithColumnNumber;
102 struct FetchEventTimeStamps {
103   TimeStamp fetchHandlerStart;
104   TimeStamp fetchHandlerFinish;
107 struct IPCSynthesizeResponseArgs {
108   IPCInternalResponse internalResponse;
109   FetchEventRespondWithClosure closure;
110   FetchEventTimeStamps timeStamps;
113 struct ResetInterceptionArgs {
114   FetchEventTimeStamps timeStamps;
117 struct CancelInterceptionArgs {
118   nsresult status;
119   FetchEventTimeStamps timeStamps;
122 union IPCFetchEventRespondWithResult {
123   IPCSynthesizeResponseArgs;
124   ResetInterceptionArgs;
125   CancelInterceptionArgs;
129  * ServiceWorkerOpResult
130  */
131 struct ServiceWorkerCheckScriptEvaluationOpResult {
132   bool workerScriptExecutedSuccessfully;
133   bool fetchHandlerWasAdded;
136 struct ServiceWorkerFetchEventOpResult {
137   nsresult rv;
140 union ServiceWorkerOpResult {
141   nsresult;
142   ServiceWorkerCheckScriptEvaluationOpResult;
143   ServiceWorkerFetchEventOpResult;
146 }  // namespace dom
147 }  // namespace mozilla