1 | /* |
2 | * Copyright (C) 2010-2018 Apple Inc. All rights reserved. |
3 | * |
4 | * Redistribution and use in source and binary forms, with or without |
5 | * modification, are permitted provided that the following conditions |
6 | * are met: |
7 | * 1. Redistributions of source code must retain the above copyright |
8 | * notice, this list of conditions and the following disclaimer. |
9 | * 2. Redistributions in binary form must reproduce the above copyright |
10 | * notice, this list of conditions and the following disclaimer in the |
11 | * documentation and/or other materials provided with the distribution. |
12 | * |
13 | * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND |
14 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
15 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
16 | * DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR |
17 | * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
18 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR |
19 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER |
20 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
21 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
22 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
23 | */ |
24 | |
25 | #pragma once |
26 | |
27 | #include "ArgumentCoders.h" |
28 | #include "Connection.h" |
29 | #include "SandboxExtension.h" |
30 | #include "UserContentControllerIdentifier.h" |
31 | #include "WebsiteDataFetchOption.h" |
32 | #include "WebsiteDataType.h" |
33 | #include <WebCore/PageIdentifier.h> |
34 | #include <WebCore/RegistrableDomain.h> |
35 | #include <wtf/Forward.h> |
36 | #include <wtf/HashSet.h> |
37 | #include <wtf/OptionSet.h> |
38 | #include <wtf/Optional.h> |
39 | #include <wtf/ThreadSafeRefCounted.h> |
40 | #include <wtf/Vector.h> |
41 | #include <wtf/text/WTFString.h> |
42 | |
43 | namespace IPC { |
44 | class Attachment; |
45 | } |
46 | |
47 | namespace PAL { |
48 | class SessionID; |
49 | } |
50 | |
51 | namespace WebCore { |
52 | class RegistrableDomain; |
53 | struct ClientOrigin; |
54 | enum class ShouldSample : bool; |
55 | class AuthenticationChallenge; |
56 | } |
57 | |
58 | namespace WebKit { |
59 | struct WebsiteData; |
60 | } |
61 | |
62 | namespace Messages { |
63 | namespace NetworkProcessProxy { |
64 | |
65 | static inline IPC::StringReference messageReceiverName() |
66 | { |
67 | return IPC::StringReference("NetworkProcessProxy" ); |
68 | } |
69 | |
70 | class DidCreateNetworkConnectionToWebProcess { |
71 | public: |
72 | typedef std::tuple<const IPC::Attachment&> Arguments; |
73 | |
74 | static IPC::StringReference receiverName() { return messageReceiverName(); } |
75 | static IPC::StringReference name() { return IPC::StringReference("DidCreateNetworkConnectionToWebProcess" ); } |
76 | static const bool isSync = false; |
77 | |
78 | explicit DidCreateNetworkConnectionToWebProcess(const IPC::Attachment& connectionIdentifier) |
79 | : m_arguments(connectionIdentifier) |
80 | { |
81 | } |
82 | |
83 | const Arguments& arguments() const |
84 | { |
85 | return m_arguments; |
86 | } |
87 | |
88 | private: |
89 | Arguments m_arguments; |
90 | }; |
91 | |
92 | class DidReceiveAuthenticationChallenge { |
93 | public: |
94 | typedef std::tuple<const WebCore::PageIdentifier&, uint64_t, const WebCore::AuthenticationChallenge&, uint64_t> Arguments; |
95 | |
96 | static IPC::StringReference receiverName() { return messageReceiverName(); } |
97 | static IPC::StringReference name() { return IPC::StringReference("DidReceiveAuthenticationChallenge" ); } |
98 | static const bool isSync = false; |
99 | |
100 | DidReceiveAuthenticationChallenge(const WebCore::PageIdentifier& pageID, uint64_t frameID, const WebCore::AuthenticationChallenge& challenge, uint64_t challengeID) |
101 | : m_arguments(pageID, frameID, challenge, challengeID) |
102 | { |
103 | } |
104 | |
105 | const Arguments& arguments() const |
106 | { |
107 | return m_arguments; |
108 | } |
109 | |
110 | private: |
111 | Arguments m_arguments; |
112 | }; |
113 | |
114 | class DidFetchWebsiteData { |
115 | public: |
116 | typedef std::tuple<uint64_t, const WebKit::WebsiteData&> Arguments; |
117 | |
118 | static IPC::StringReference receiverName() { return messageReceiverName(); } |
119 | static IPC::StringReference name() { return IPC::StringReference("DidFetchWebsiteData" ); } |
120 | static const bool isSync = false; |
121 | |
122 | DidFetchWebsiteData(uint64_t callbackID, const WebKit::WebsiteData& websiteData) |
123 | : m_arguments(callbackID, websiteData) |
124 | { |
125 | } |
126 | |
127 | const Arguments& arguments() const |
128 | { |
129 | return m_arguments; |
130 | } |
131 | |
132 | private: |
133 | Arguments m_arguments; |
134 | }; |
135 | |
136 | class DidDeleteWebsiteData { |
137 | public: |
138 | typedef std::tuple<uint64_t> Arguments; |
139 | |
140 | static IPC::StringReference receiverName() { return messageReceiverName(); } |
141 | static IPC::StringReference name() { return IPC::StringReference("DidDeleteWebsiteData" ); } |
142 | static const bool isSync = false; |
143 | |
144 | explicit DidDeleteWebsiteData(uint64_t callbackID) |
145 | : m_arguments(callbackID) |
146 | { |
147 | } |
148 | |
149 | const Arguments& arguments() const |
150 | { |
151 | return m_arguments; |
152 | } |
153 | |
154 | private: |
155 | Arguments m_arguments; |
156 | }; |
157 | |
158 | class DidDeleteWebsiteDataForOrigins { |
159 | public: |
160 | typedef std::tuple<uint64_t> Arguments; |
161 | |
162 | static IPC::StringReference receiverName() { return messageReceiverName(); } |
163 | static IPC::StringReference name() { return IPC::StringReference("DidDeleteWebsiteDataForOrigins" ); } |
164 | static const bool isSync = false; |
165 | |
166 | explicit DidDeleteWebsiteDataForOrigins(uint64_t callbackID) |
167 | : m_arguments(callbackID) |
168 | { |
169 | } |
170 | |
171 | const Arguments& arguments() const |
172 | { |
173 | return m_arguments; |
174 | } |
175 | |
176 | private: |
177 | Arguments m_arguments; |
178 | }; |
179 | |
180 | class DidSyncAllCookies { |
181 | public: |
182 | typedef std::tuple<> Arguments; |
183 | |
184 | static IPC::StringReference receiverName() { return messageReceiverName(); } |
185 | static IPC::StringReference name() { return IPC::StringReference("DidSyncAllCookies" ); } |
186 | static const bool isSync = false; |
187 | |
188 | const Arguments& arguments() const |
189 | { |
190 | return m_arguments; |
191 | } |
192 | |
193 | private: |
194 | Arguments m_arguments; |
195 | }; |
196 | |
197 | class ProcessReadyToSuspend { |
198 | public: |
199 | typedef std::tuple<> Arguments; |
200 | |
201 | static IPC::StringReference receiverName() { return messageReceiverName(); } |
202 | static IPC::StringReference name() { return IPC::StringReference("ProcessReadyToSuspend" ); } |
203 | static const bool isSync = false; |
204 | |
205 | const Arguments& arguments() const |
206 | { |
207 | return m_arguments; |
208 | } |
209 | |
210 | private: |
211 | Arguments m_arguments; |
212 | }; |
213 | |
214 | class SetIsHoldingLockedFiles { |
215 | public: |
216 | typedef std::tuple<bool> Arguments; |
217 | |
218 | static IPC::StringReference receiverName() { return messageReceiverName(); } |
219 | static IPC::StringReference name() { return IPC::StringReference("SetIsHoldingLockedFiles" ); } |
220 | static const bool isSync = false; |
221 | |
222 | explicit SetIsHoldingLockedFiles(bool isHoldingLockedFiles) |
223 | : m_arguments(isHoldingLockedFiles) |
224 | { |
225 | } |
226 | |
227 | const Arguments& arguments() const |
228 | { |
229 | return m_arguments; |
230 | } |
231 | |
232 | private: |
233 | Arguments m_arguments; |
234 | }; |
235 | |
236 | class LogDiagnosticMessage { |
237 | public: |
238 | typedef std::tuple<const WebCore::PageIdentifier&, const String&, const String&, WebCore::ShouldSample> Arguments; |
239 | |
240 | static IPC::StringReference receiverName() { return messageReceiverName(); } |
241 | static IPC::StringReference name() { return IPC::StringReference("LogDiagnosticMessage" ); } |
242 | static const bool isSync = false; |
243 | |
244 | LogDiagnosticMessage(const WebCore::PageIdentifier& pageID, const String& message, const String& description, WebCore::ShouldSample shouldSample) |
245 | : m_arguments(pageID, message, description, shouldSample) |
246 | { |
247 | } |
248 | |
249 | const Arguments& arguments() const |
250 | { |
251 | return m_arguments; |
252 | } |
253 | |
254 | private: |
255 | Arguments m_arguments; |
256 | }; |
257 | |
258 | class LogDiagnosticMessageWithResult { |
259 | public: |
260 | typedef std::tuple<const WebCore::PageIdentifier&, const String&, const String&, uint32_t, WebCore::ShouldSample> Arguments; |
261 | |
262 | static IPC::StringReference receiverName() { return messageReceiverName(); } |
263 | static IPC::StringReference name() { return IPC::StringReference("LogDiagnosticMessageWithResult" ); } |
264 | static const bool isSync = false; |
265 | |
266 | LogDiagnosticMessageWithResult(const WebCore::PageIdentifier& pageID, const String& message, const String& description, uint32_t result, WebCore::ShouldSample shouldSample) |
267 | : m_arguments(pageID, message, description, result, shouldSample) |
268 | { |
269 | } |
270 | |
271 | const Arguments& arguments() const |
272 | { |
273 | return m_arguments; |
274 | } |
275 | |
276 | private: |
277 | Arguments m_arguments; |
278 | }; |
279 | |
280 | class LogDiagnosticMessageWithValue { |
281 | public: |
282 | typedef std::tuple<const WebCore::PageIdentifier&, const String&, const String&, double, const unsigned&, WebCore::ShouldSample> Arguments; |
283 | |
284 | static IPC::StringReference receiverName() { return messageReceiverName(); } |
285 | static IPC::StringReference name() { return IPC::StringReference("LogDiagnosticMessageWithValue" ); } |
286 | static const bool isSync = false; |
287 | |
288 | LogDiagnosticMessageWithValue(const WebCore::PageIdentifier& pageID, const String& message, const String& description, double value, const unsigned& significantFigures, WebCore::ShouldSample shouldSample) |
289 | : m_arguments(pageID, message, description, value, significantFigures, shouldSample) |
290 | { |
291 | } |
292 | |
293 | const Arguments& arguments() const |
294 | { |
295 | return m_arguments; |
296 | } |
297 | |
298 | private: |
299 | Arguments m_arguments; |
300 | }; |
301 | |
302 | class LogGlobalDiagnosticMessageWithValue { |
303 | public: |
304 | typedef std::tuple<const String&, const String&, double, const unsigned&, WebCore::ShouldSample> Arguments; |
305 | |
306 | static IPC::StringReference receiverName() { return messageReceiverName(); } |
307 | static IPC::StringReference name() { return IPC::StringReference("LogGlobalDiagnosticMessageWithValue" ); } |
308 | static const bool isSync = false; |
309 | |
310 | LogGlobalDiagnosticMessageWithValue(const String& message, const String& description, double value, const unsigned& significantFigures, WebCore::ShouldSample shouldSample) |
311 | : m_arguments(message, description, value, significantFigures, shouldSample) |
312 | { |
313 | } |
314 | |
315 | const Arguments& arguments() const |
316 | { |
317 | return m_arguments; |
318 | } |
319 | |
320 | private: |
321 | Arguments m_arguments; |
322 | }; |
323 | |
324 | #if ENABLE(RESOURCE_LOAD_STATISTICS) |
325 | class LogTestingEvent { |
326 | public: |
327 | typedef std::tuple<const PAL::SessionID&, const String&> Arguments; |
328 | |
329 | static IPC::StringReference receiverName() { return messageReceiverName(); } |
330 | static IPC::StringReference name() { return IPC::StringReference("LogTestingEvent" ); } |
331 | static const bool isSync = false; |
332 | |
333 | LogTestingEvent(const PAL::SessionID& sessionID, const String& event) |
334 | : m_arguments(sessionID, event) |
335 | { |
336 | } |
337 | |
338 | const Arguments& arguments() const |
339 | { |
340 | return m_arguments; |
341 | } |
342 | |
343 | private: |
344 | Arguments m_arguments; |
345 | }; |
346 | #endif |
347 | |
348 | #if ENABLE(RESOURCE_LOAD_STATISTICS) |
349 | class NotifyResourceLoadStatisticsProcessed { |
350 | public: |
351 | typedef std::tuple<> Arguments; |
352 | |
353 | static IPC::StringReference receiverName() { return messageReceiverName(); } |
354 | static IPC::StringReference name() { return IPC::StringReference("NotifyResourceLoadStatisticsProcessed" ); } |
355 | static const bool isSync = false; |
356 | |
357 | const Arguments& arguments() const |
358 | { |
359 | return m_arguments; |
360 | } |
361 | |
362 | private: |
363 | Arguments m_arguments; |
364 | }; |
365 | #endif |
366 | |
367 | #if ENABLE(RESOURCE_LOAD_STATISTICS) |
368 | class NotifyWebsiteDataDeletionForRegistrableDomainsFinished { |
369 | public: |
370 | typedef std::tuple<> Arguments; |
371 | |
372 | static IPC::StringReference receiverName() { return messageReceiverName(); } |
373 | static IPC::StringReference name() { return IPC::StringReference("NotifyWebsiteDataDeletionForRegistrableDomainsFinished" ); } |
374 | static const bool isSync = false; |
375 | |
376 | const Arguments& arguments() const |
377 | { |
378 | return m_arguments; |
379 | } |
380 | |
381 | private: |
382 | Arguments m_arguments; |
383 | }; |
384 | #endif |
385 | |
386 | #if ENABLE(RESOURCE_LOAD_STATISTICS) |
387 | class NotifyWebsiteDataScanForRegistrableDomainsFinished { |
388 | public: |
389 | typedef std::tuple<> Arguments; |
390 | |
391 | static IPC::StringReference receiverName() { return messageReceiverName(); } |
392 | static IPC::StringReference name() { return IPC::StringReference("NotifyWebsiteDataScanForRegistrableDomainsFinished" ); } |
393 | static const bool isSync = false; |
394 | |
395 | const Arguments& arguments() const |
396 | { |
397 | return m_arguments; |
398 | } |
399 | |
400 | private: |
401 | Arguments m_arguments; |
402 | }; |
403 | #endif |
404 | |
405 | #if ENABLE(RESOURCE_LOAD_STATISTICS) |
406 | class NotifyResourceLoadStatisticsTelemetryFinished { |
407 | public: |
408 | typedef std::tuple<const unsigned&, const unsigned&, const unsigned&> Arguments; |
409 | |
410 | static IPC::StringReference receiverName() { return messageReceiverName(); } |
411 | static IPC::StringReference name() { return IPC::StringReference("NotifyResourceLoadStatisticsTelemetryFinished" ); } |
412 | static const bool isSync = false; |
413 | |
414 | NotifyResourceLoadStatisticsTelemetryFinished(const unsigned& totalPrevalentResources, const unsigned& totalPrevalentResourcesWithUserInteraction, const unsigned& top3SubframeUnderTopFrameOrigins) |
415 | : m_arguments(totalPrevalentResources, totalPrevalentResourcesWithUserInteraction, top3SubframeUnderTopFrameOrigins) |
416 | { |
417 | } |
418 | |
419 | const Arguments& arguments() const |
420 | { |
421 | return m_arguments; |
422 | } |
423 | |
424 | private: |
425 | Arguments m_arguments; |
426 | }; |
427 | #endif |
428 | |
429 | #if ENABLE(RESOURCE_LOAD_STATISTICS) |
430 | class RequestStorageAccessConfirm { |
431 | public: |
432 | typedef std::tuple<const WebCore::PageIdentifier&, uint64_t, const WebCore::RegistrableDomain&, const WebCore::RegistrableDomain&> Arguments; |
433 | |
434 | static IPC::StringReference receiverName() { return messageReceiverName(); } |
435 | static IPC::StringReference name() { return IPC::StringReference("RequestStorageAccessConfirm" ); } |
436 | static const bool isSync = false; |
437 | |
438 | static void callReply(IPC::Decoder&, CompletionHandler<void(bool&&)>&&); |
439 | static void cancelReply(CompletionHandler<void(bool&&)>&&); |
440 | static IPC::StringReference asyncMessageReplyName() { return { "RequestStorageAccessConfirmReply" }; } |
441 | using AsyncReply = CompletionHandler<void(bool userDidGrantAccess)>; |
442 | static void send(std::unique_ptr<IPC::Encoder>&&, IPC::Connection&, bool userDidGrantAccess); |
443 | using Reply = std::tuple<bool&>; |
444 | using ReplyArguments = std::tuple<bool>; |
445 | RequestStorageAccessConfirm(const WebCore::PageIdentifier& pageID, uint64_t frameID, const WebCore::RegistrableDomain& subFrameDomain, const WebCore::RegistrableDomain& topFrameDomain) |
446 | : m_arguments(pageID, frameID, subFrameDomain, topFrameDomain) |
447 | { |
448 | } |
449 | |
450 | const Arguments& arguments() const |
451 | { |
452 | return m_arguments; |
453 | } |
454 | |
455 | private: |
456 | Arguments m_arguments; |
457 | }; |
458 | #endif |
459 | |
460 | #if ENABLE(RESOURCE_LOAD_STATISTICS) |
461 | class DeleteWebsiteDataInUIProcessForRegistrableDomains { |
462 | public: |
463 | typedef std::tuple<const PAL::SessionID&, const OptionSet<WebKit::WebsiteDataType>&, const OptionSet<WebKit::WebsiteDataFetchOption>&, const Vector<WebCore::RegistrableDomain>&> Arguments; |
464 | |
465 | static IPC::StringReference receiverName() { return messageReceiverName(); } |
466 | static IPC::StringReference name() { return IPC::StringReference("DeleteWebsiteDataInUIProcessForRegistrableDomains" ); } |
467 | static const bool isSync = false; |
468 | |
469 | static void callReply(IPC::Decoder&, CompletionHandler<void(HashSet<WebCore::RegistrableDomain>&&)>&&); |
470 | static void cancelReply(CompletionHandler<void(HashSet<WebCore::RegistrableDomain>&&)>&&); |
471 | static IPC::StringReference asyncMessageReplyName() { return { "DeleteWebsiteDataInUIProcessForRegistrableDomainsReply" }; } |
472 | using AsyncReply = CompletionHandler<void(const HashSet<WebCore::RegistrableDomain>& domainsWithMatchingDataRecords)>; |
473 | static void send(std::unique_ptr<IPC::Encoder>&&, IPC::Connection&, const HashSet<WebCore::RegistrableDomain>& domainsWithMatchingDataRecords); |
474 | using Reply = std::tuple<HashSet<WebCore::RegistrableDomain>&>; |
475 | using ReplyArguments = std::tuple<HashSet<WebCore::RegistrableDomain>>; |
476 | DeleteWebsiteDataInUIProcessForRegistrableDomains(const PAL::SessionID& sessionID, const OptionSet<WebKit::WebsiteDataType>& dataTypes, const OptionSet<WebKit::WebsiteDataFetchOption>& fetchOptions, const Vector<WebCore::RegistrableDomain>& domains) |
477 | : m_arguments(sessionID, dataTypes, fetchOptions, domains) |
478 | { |
479 | } |
480 | |
481 | const Arguments& arguments() const |
482 | { |
483 | return m_arguments; |
484 | } |
485 | |
486 | private: |
487 | Arguments m_arguments; |
488 | }; |
489 | #endif |
490 | |
491 | #if ENABLE(RESOURCE_LOAD_STATISTICS) |
492 | class DidCommitCrossSiteLoadWithDataTransferFromPrevalentResource { |
493 | public: |
494 | typedef std::tuple<const WebCore::PageIdentifier&> Arguments; |
495 | |
496 | static IPC::StringReference receiverName() { return messageReceiverName(); } |
497 | static IPC::StringReference name() { return IPC::StringReference("DidCommitCrossSiteLoadWithDataTransferFromPrevalentResource" ); } |
498 | static const bool isSync = false; |
499 | |
500 | explicit DidCommitCrossSiteLoadWithDataTransferFromPrevalentResource(const WebCore::PageIdentifier& pageID) |
501 | : m_arguments(pageID) |
502 | { |
503 | } |
504 | |
505 | const Arguments& arguments() const |
506 | { |
507 | return m_arguments; |
508 | } |
509 | |
510 | private: |
511 | Arguments m_arguments; |
512 | }; |
513 | #endif |
514 | |
515 | #if ENABLE(CONTENT_EXTENSIONS) |
516 | class ContentExtensionRules { |
517 | public: |
518 | typedef std::tuple<const WebKit::UserContentControllerIdentifier&> Arguments; |
519 | |
520 | static IPC::StringReference receiverName() { return messageReceiverName(); } |
521 | static IPC::StringReference name() { return IPC::StringReference("ContentExtensionRules" ); } |
522 | static const bool isSync = false; |
523 | |
524 | explicit ContentExtensionRules(const WebKit::UserContentControllerIdentifier& identifier) |
525 | : m_arguments(identifier) |
526 | { |
527 | } |
528 | |
529 | const Arguments& arguments() const |
530 | { |
531 | return m_arguments; |
532 | } |
533 | |
534 | private: |
535 | Arguments m_arguments; |
536 | }; |
537 | #endif |
538 | |
539 | class RetrieveCacheStorageParameters { |
540 | public: |
541 | typedef std::tuple<const PAL::SessionID&> Arguments; |
542 | |
543 | static IPC::StringReference receiverName() { return messageReceiverName(); } |
544 | static IPC::StringReference name() { return IPC::StringReference("RetrieveCacheStorageParameters" ); } |
545 | static const bool isSync = false; |
546 | |
547 | explicit RetrieveCacheStorageParameters(const PAL::SessionID& sessionID) |
548 | : m_arguments(sessionID) |
549 | { |
550 | } |
551 | |
552 | const Arguments& arguments() const |
553 | { |
554 | return m_arguments; |
555 | } |
556 | |
557 | private: |
558 | Arguments m_arguments; |
559 | }; |
560 | |
561 | #if ENABLE(SANDBOX_EXTENSIONS) |
562 | class GetSandboxExtensionsForBlobFiles { |
563 | public: |
564 | typedef std::tuple<const Vector<String>&> Arguments; |
565 | |
566 | static IPC::StringReference receiverName() { return messageReceiverName(); } |
567 | static IPC::StringReference name() { return IPC::StringReference("GetSandboxExtensionsForBlobFiles" ); } |
568 | static const bool isSync = false; |
569 | |
570 | static void callReply(IPC::Decoder&, CompletionHandler<void(WebKit::SandboxExtension::HandleArray&&)>&&); |
571 | static void cancelReply(CompletionHandler<void(WebKit::SandboxExtension::HandleArray&&)>&&); |
572 | static IPC::StringReference asyncMessageReplyName() { return { "GetSandboxExtensionsForBlobFilesReply" }; } |
573 | using AsyncReply = CompletionHandler<void(const WebKit::SandboxExtension::HandleArray& extensions)>; |
574 | static void send(std::unique_ptr<IPC::Encoder>&&, IPC::Connection&, const WebKit::SandboxExtension::HandleArray& extensions); |
575 | using Reply = std::tuple<WebKit::SandboxExtension::HandleArray&>; |
576 | using ReplyArguments = std::tuple<WebKit::SandboxExtension::HandleArray>; |
577 | explicit GetSandboxExtensionsForBlobFiles(const Vector<String>& paths) |
578 | : m_arguments(paths) |
579 | { |
580 | } |
581 | |
582 | const Arguments& arguments() const |
583 | { |
584 | return m_arguments; |
585 | } |
586 | |
587 | private: |
588 | Arguments m_arguments; |
589 | }; |
590 | #endif |
591 | |
592 | #if ENABLE(SERVICE_WORKER) |
593 | class EstablishWorkerContextConnectionToNetworkProcess { |
594 | public: |
595 | typedef std::tuple<const WebCore::RegistrableDomain&> Arguments; |
596 | |
597 | static IPC::StringReference receiverName() { return messageReceiverName(); } |
598 | static IPC::StringReference name() { return IPC::StringReference("EstablishWorkerContextConnectionToNetworkProcess" ); } |
599 | static const bool isSync = false; |
600 | |
601 | explicit EstablishWorkerContextConnectionToNetworkProcess(const WebCore::RegistrableDomain& registrableDomain) |
602 | : m_arguments(registrableDomain) |
603 | { |
604 | } |
605 | |
606 | const Arguments& arguments() const |
607 | { |
608 | return m_arguments; |
609 | } |
610 | |
611 | private: |
612 | Arguments m_arguments; |
613 | }; |
614 | #endif |
615 | |
616 | #if ENABLE(SERVICE_WORKER) |
617 | class EstablishWorkerContextConnectionToNetworkProcessForExplicitSession { |
618 | public: |
619 | typedef std::tuple<const WebCore::RegistrableDomain&, const PAL::SessionID&> Arguments; |
620 | |
621 | static IPC::StringReference receiverName() { return messageReceiverName(); } |
622 | static IPC::StringReference name() { return IPC::StringReference("EstablishWorkerContextConnectionToNetworkProcessForExplicitSession" ); } |
623 | static const bool isSync = false; |
624 | |
625 | EstablishWorkerContextConnectionToNetworkProcessForExplicitSession(const WebCore::RegistrableDomain& registrableDomain, const PAL::SessionID& explicitSession) |
626 | : m_arguments(registrableDomain, explicitSession) |
627 | { |
628 | } |
629 | |
630 | const Arguments& arguments() const |
631 | { |
632 | return m_arguments; |
633 | } |
634 | |
635 | private: |
636 | Arguments m_arguments; |
637 | }; |
638 | #endif |
639 | |
640 | class RequestStorageSpace { |
641 | public: |
642 | typedef std::tuple<const PAL::SessionID&, const WebCore::ClientOrigin&, uint64_t, uint64_t, uint64_t> Arguments; |
643 | |
644 | static IPC::StringReference receiverName() { return messageReceiverName(); } |
645 | static IPC::StringReference name() { return IPC::StringReference("RequestStorageSpace" ); } |
646 | static const bool isSync = false; |
647 | |
648 | static void callReply(IPC::Decoder&, CompletionHandler<void(Optional<uint64_t>&&)>&&); |
649 | static void cancelReply(CompletionHandler<void(Optional<uint64_t>&&)>&&); |
650 | static IPC::StringReference asyncMessageReplyName() { return { "RequestStorageSpaceReply" }; } |
651 | using AsyncReply = CompletionHandler<void(const Optional<uint64_t>& newQuota)>; |
652 | static void send(std::unique_ptr<IPC::Encoder>&&, IPC::Connection&, const Optional<uint64_t>& newQuota); |
653 | using Reply = std::tuple<Optional<uint64_t>&>; |
654 | using ReplyArguments = std::tuple<Optional<uint64_t>>; |
655 | RequestStorageSpace(const PAL::SessionID& sessionID, const WebCore::ClientOrigin& origin, uint64_t quota, uint64_t currentSize, uint64_t spaceRequired) |
656 | : m_arguments(sessionID, origin, quota, currentSize, spaceRequired) |
657 | { |
658 | } |
659 | |
660 | const Arguments& arguments() const |
661 | { |
662 | return m_arguments; |
663 | } |
664 | |
665 | private: |
666 | Arguments m_arguments; |
667 | }; |
668 | |
669 | } // namespace NetworkProcessProxy |
670 | } // namespace Messages |
671 | |