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 <WebCore/BlobPart.h> |
31 | #include <WebCore/Cookie.h> |
32 | #include <WebCore/NetworkLoadInformation.h> |
33 | #include <WebCore/PageIdentifier.h> |
34 | #include <WebCore/ResourceLoadStatistics.h> |
35 | #include <WebCore/ServiceWorkerTypes.h> |
36 | #include <wtf/Forward.h> |
37 | #include <wtf/Optional.h> |
38 | #include <wtf/ThreadSafeRefCounted.h> |
39 | #include <wtf/Vector.h> |
40 | #include <wtf/text/WTFString.h> |
41 | |
42 | namespace PAL { |
43 | class SessionID; |
44 | } |
45 | |
46 | namespace WebCore { |
47 | class ResourceResponse; |
48 | enum class StorageAccessWasGranted : bool; |
49 | class NetworkLoadMetrics; |
50 | struct SameSiteInfo; |
51 | enum class StorageAccessPromptWasShown : bool; |
52 | enum class IncludeSecureCookies : bool; |
53 | class RegistrableDomain; |
54 | class ResourceRequest; |
55 | class ResourceError; |
56 | } |
57 | |
58 | namespace WebKit { |
59 | class NetworkResourceLoadParameters; |
60 | class DownloadID; |
61 | } |
62 | |
63 | namespace Messages { |
64 | namespace NetworkConnectionToWebProcess { |
65 | |
66 | static inline IPC::StringReference messageReceiverName() |
67 | { |
68 | return IPC::StringReference("NetworkConnectionToWebProcess" ); |
69 | } |
70 | |
71 | class ScheduleResourceLoad { |
72 | public: |
73 | typedef std::tuple<const WebKit::NetworkResourceLoadParameters&> Arguments; |
74 | |
75 | static IPC::StringReference receiverName() { return messageReceiverName(); } |
76 | static IPC::StringReference name() { return IPC::StringReference("ScheduleResourceLoad" ); } |
77 | static const bool isSync = false; |
78 | |
79 | explicit ScheduleResourceLoad(const WebKit::NetworkResourceLoadParameters& resourceLoadParameters) |
80 | : m_arguments(resourceLoadParameters) |
81 | { |
82 | } |
83 | |
84 | const Arguments& arguments() const |
85 | { |
86 | return m_arguments; |
87 | } |
88 | |
89 | private: |
90 | Arguments m_arguments; |
91 | }; |
92 | |
93 | class PerformSynchronousLoad { |
94 | public: |
95 | typedef std::tuple<const WebKit::NetworkResourceLoadParameters&> Arguments; |
96 | |
97 | static IPC::StringReference receiverName() { return messageReceiverName(); } |
98 | static IPC::StringReference name() { return IPC::StringReference("PerformSynchronousLoad" ); } |
99 | static const bool isSync = true; |
100 | |
101 | using DelayedReply = CompletionHandler<void(const WebCore::ResourceError& error, const WebCore::ResourceResponse& response, const Vector<char>& data)>; |
102 | static void send(std::unique_ptr<IPC::Encoder>&&, IPC::Connection&, const WebCore::ResourceError& error, const WebCore::ResourceResponse& response, const Vector<char>& data); |
103 | using Reply = std::tuple<WebCore::ResourceError&, WebCore::ResourceResponse&, Vector<char>&>; |
104 | using ReplyArguments = std::tuple<WebCore::ResourceError, WebCore::ResourceResponse, Vector<char>>; |
105 | explicit PerformSynchronousLoad(const WebKit::NetworkResourceLoadParameters& resourceLoadParameters) |
106 | : m_arguments(resourceLoadParameters) |
107 | { |
108 | } |
109 | |
110 | const Arguments& arguments() const |
111 | { |
112 | return m_arguments; |
113 | } |
114 | |
115 | private: |
116 | Arguments m_arguments; |
117 | }; |
118 | |
119 | class LoadPing { |
120 | public: |
121 | typedef std::tuple<const WebKit::NetworkResourceLoadParameters&> Arguments; |
122 | |
123 | static IPC::StringReference receiverName() { return messageReceiverName(); } |
124 | static IPC::StringReference name() { return IPC::StringReference("LoadPing" ); } |
125 | static const bool isSync = false; |
126 | |
127 | explicit LoadPing(const WebKit::NetworkResourceLoadParameters& resourceLoadParameters) |
128 | : m_arguments(resourceLoadParameters) |
129 | { |
130 | } |
131 | |
132 | const Arguments& arguments() const |
133 | { |
134 | return m_arguments; |
135 | } |
136 | |
137 | private: |
138 | Arguments m_arguments; |
139 | }; |
140 | |
141 | class RemoveLoadIdentifier { |
142 | public: |
143 | typedef std::tuple<uint64_t> Arguments; |
144 | |
145 | static IPC::StringReference receiverName() { return messageReceiverName(); } |
146 | static IPC::StringReference name() { return IPC::StringReference("RemoveLoadIdentifier" ); } |
147 | static const bool isSync = false; |
148 | |
149 | explicit RemoveLoadIdentifier(uint64_t resourceLoadIdentifier) |
150 | : m_arguments(resourceLoadIdentifier) |
151 | { |
152 | } |
153 | |
154 | const Arguments& arguments() const |
155 | { |
156 | return m_arguments; |
157 | } |
158 | |
159 | private: |
160 | Arguments m_arguments; |
161 | }; |
162 | |
163 | class PageLoadCompleted { |
164 | public: |
165 | typedef std::tuple<const WebCore::PageIdentifier&> Arguments; |
166 | |
167 | static IPC::StringReference receiverName() { return messageReceiverName(); } |
168 | static IPC::StringReference name() { return IPC::StringReference("PageLoadCompleted" ); } |
169 | static const bool isSync = false; |
170 | |
171 | explicit PageLoadCompleted(const WebCore::PageIdentifier& webPageID) |
172 | : m_arguments(webPageID) |
173 | { |
174 | } |
175 | |
176 | const Arguments& arguments() const |
177 | { |
178 | return m_arguments; |
179 | } |
180 | |
181 | private: |
182 | Arguments m_arguments; |
183 | }; |
184 | |
185 | class PrefetchDNS { |
186 | public: |
187 | typedef std::tuple<const String&> Arguments; |
188 | |
189 | static IPC::StringReference receiverName() { return messageReceiverName(); } |
190 | static IPC::StringReference name() { return IPC::StringReference("PrefetchDNS" ); } |
191 | static const bool isSync = false; |
192 | |
193 | explicit PrefetchDNS(const String& hostname) |
194 | : m_arguments(hostname) |
195 | { |
196 | } |
197 | |
198 | const Arguments& arguments() const |
199 | { |
200 | return m_arguments; |
201 | } |
202 | |
203 | private: |
204 | Arguments m_arguments; |
205 | }; |
206 | |
207 | class PreconnectTo { |
208 | public: |
209 | typedef std::tuple<uint64_t, const WebKit::NetworkResourceLoadParameters&> Arguments; |
210 | |
211 | static IPC::StringReference receiverName() { return messageReceiverName(); } |
212 | static IPC::StringReference name() { return IPC::StringReference("PreconnectTo" ); } |
213 | static const bool isSync = false; |
214 | |
215 | PreconnectTo(uint64_t preconnectionIdentifier, const WebKit::NetworkResourceLoadParameters& loadParameters) |
216 | : m_arguments(preconnectionIdentifier, loadParameters) |
217 | { |
218 | } |
219 | |
220 | const Arguments& arguments() const |
221 | { |
222 | return m_arguments; |
223 | } |
224 | |
225 | private: |
226 | Arguments m_arguments; |
227 | }; |
228 | |
229 | class StartDownload { |
230 | public: |
231 | typedef std::tuple<const PAL::SessionID&, const WebKit::DownloadID&, const WebCore::ResourceRequest&, const String&> Arguments; |
232 | |
233 | static IPC::StringReference receiverName() { return messageReceiverName(); } |
234 | static IPC::StringReference name() { return IPC::StringReference("StartDownload" ); } |
235 | static const bool isSync = false; |
236 | |
237 | StartDownload(const PAL::SessionID& sessionID, const WebKit::DownloadID& downloadID, const WebCore::ResourceRequest& request, const String& suggestedName) |
238 | : m_arguments(sessionID, downloadID, request, suggestedName) |
239 | { |
240 | } |
241 | |
242 | const Arguments& arguments() const |
243 | { |
244 | return m_arguments; |
245 | } |
246 | |
247 | private: |
248 | Arguments m_arguments; |
249 | }; |
250 | |
251 | class ConvertMainResourceLoadToDownload { |
252 | public: |
253 | typedef std::tuple<const PAL::SessionID&, uint64_t, const WebKit::DownloadID&, const WebCore::ResourceRequest&, const WebCore::ResourceResponse&> Arguments; |
254 | |
255 | static IPC::StringReference receiverName() { return messageReceiverName(); } |
256 | static IPC::StringReference name() { return IPC::StringReference("ConvertMainResourceLoadToDownload" ); } |
257 | static const bool isSync = false; |
258 | |
259 | ConvertMainResourceLoadToDownload(const PAL::SessionID& sessionID, uint64_t mainResourceLoadIdentifier, const WebKit::DownloadID& downloadID, const WebCore::ResourceRequest& request, const WebCore::ResourceResponse& response) |
260 | : m_arguments(sessionID, mainResourceLoadIdentifier, downloadID, request, response) |
261 | { |
262 | } |
263 | |
264 | const Arguments& arguments() const |
265 | { |
266 | return m_arguments; |
267 | } |
268 | |
269 | private: |
270 | Arguments m_arguments; |
271 | }; |
272 | |
273 | class CookiesForDOM { |
274 | public: |
275 | typedef std::tuple<const PAL::SessionID&, const URL&, const WebCore::SameSiteInfo&, const URL&, const Optional<uint64_t>&, const Optional<WebCore::PageIdentifier>&, WebCore::IncludeSecureCookies> Arguments; |
276 | |
277 | static IPC::StringReference receiverName() { return messageReceiverName(); } |
278 | static IPC::StringReference name() { return IPC::StringReference("CookiesForDOM" ); } |
279 | static const bool isSync = true; |
280 | |
281 | using DelayedReply = CompletionHandler<void(const String& cookieString, bool didAccessSecureCookies)>; |
282 | static void send(std::unique_ptr<IPC::Encoder>&&, IPC::Connection&, const String& cookieString, bool didAccessSecureCookies); |
283 | using Reply = std::tuple<String&, bool&>; |
284 | using ReplyArguments = std::tuple<String, bool>; |
285 | CookiesForDOM(const PAL::SessionID& sessionID, const URL& firstParty, const WebCore::SameSiteInfo& sameSiteInfo, const URL& url, const Optional<uint64_t>& frameID, const Optional<WebCore::PageIdentifier>& pageID, WebCore::IncludeSecureCookies includeSecureCookies) |
286 | : m_arguments(sessionID, firstParty, sameSiteInfo, url, frameID, pageID, includeSecureCookies) |
287 | { |
288 | } |
289 | |
290 | const Arguments& arguments() const |
291 | { |
292 | return m_arguments; |
293 | } |
294 | |
295 | private: |
296 | Arguments m_arguments; |
297 | }; |
298 | |
299 | class SetCookiesFromDOM { |
300 | public: |
301 | typedef std::tuple<const PAL::SessionID&, const URL&, const WebCore::SameSiteInfo&, const URL&, const Optional<uint64_t>&, const Optional<WebCore::PageIdentifier>&, const String&> Arguments; |
302 | |
303 | static IPC::StringReference receiverName() { return messageReceiverName(); } |
304 | static IPC::StringReference name() { return IPC::StringReference("SetCookiesFromDOM" ); } |
305 | static const bool isSync = false; |
306 | |
307 | SetCookiesFromDOM(const PAL::SessionID& sessionID, const URL& firstParty, const WebCore::SameSiteInfo& sameSiteInfo, const URL& url, const Optional<uint64_t>& frameID, const Optional<WebCore::PageIdentifier>& pageID, const String& cookieString) |
308 | : m_arguments(sessionID, firstParty, sameSiteInfo, url, frameID, pageID, cookieString) |
309 | { |
310 | } |
311 | |
312 | const Arguments& arguments() const |
313 | { |
314 | return m_arguments; |
315 | } |
316 | |
317 | private: |
318 | Arguments m_arguments; |
319 | }; |
320 | |
321 | class CookiesEnabled { |
322 | public: |
323 | typedef std::tuple<const PAL::SessionID&> Arguments; |
324 | |
325 | static IPC::StringReference receiverName() { return messageReceiverName(); } |
326 | static IPC::StringReference name() { return IPC::StringReference("CookiesEnabled" ); } |
327 | static const bool isSync = true; |
328 | |
329 | using DelayedReply = CompletionHandler<void(bool enabled)>; |
330 | static void send(std::unique_ptr<IPC::Encoder>&&, IPC::Connection&, bool enabled); |
331 | using Reply = std::tuple<bool&>; |
332 | using ReplyArguments = std::tuple<bool>; |
333 | explicit CookiesEnabled(const PAL::SessionID& sessionID) |
334 | : m_arguments(sessionID) |
335 | { |
336 | } |
337 | |
338 | const Arguments& arguments() const |
339 | { |
340 | return m_arguments; |
341 | } |
342 | |
343 | private: |
344 | Arguments m_arguments; |
345 | }; |
346 | |
347 | class { |
348 | public: |
349 | typedef std::tuple<const PAL::SessionID&, const URL&, const WebCore::SameSiteInfo&, const URL&, const Optional<uint64_t>&, const Optional<WebCore::PageIdentifier>&, WebCore::IncludeSecureCookies> ; |
350 | |
351 | static IPC::StringReference () { return messageReceiverName(); } |
352 | static IPC::StringReference () { return IPC::StringReference("CookieRequestHeaderFieldValue" ); } |
353 | static const bool = true; |
354 | |
355 | using = CompletionHandler<void(const String& cookieString, bool didAccessSecureCookies)>; |
356 | static void (std::unique_ptr<IPC::Encoder>&&, IPC::Connection&, const String& cookieString, bool didAccessSecureCookies); |
357 | using = std::tuple<String&, bool&>; |
358 | using = std::tuple<String, bool>; |
359 | (const PAL::SessionID& sessionID, const URL& firstParty, const WebCore::SameSiteInfo& sameSiteInfo, const URL& url, const Optional<uint64_t>& frameID, const Optional<WebCore::PageIdentifier>& pageID, WebCore::IncludeSecureCookies includeSecureCookies) |
360 | : m_arguments(sessionID, firstParty, sameSiteInfo, url, frameID, pageID, includeSecureCookies) |
361 | { |
362 | } |
363 | |
364 | const Arguments& () const |
365 | { |
366 | return m_arguments; |
367 | } |
368 | |
369 | private: |
370 | Arguments ; |
371 | }; |
372 | |
373 | class GetRawCookies { |
374 | public: |
375 | typedef std::tuple<const PAL::SessionID&, const URL&, const WebCore::SameSiteInfo&, const URL&, const Optional<uint64_t>&, const Optional<WebCore::PageIdentifier>&> Arguments; |
376 | |
377 | static IPC::StringReference receiverName() { return messageReceiverName(); } |
378 | static IPC::StringReference name() { return IPC::StringReference("GetRawCookies" ); } |
379 | static const bool isSync = true; |
380 | |
381 | using DelayedReply = CompletionHandler<void(const Vector<WebCore::Cookie>& cookies)>; |
382 | static void send(std::unique_ptr<IPC::Encoder>&&, IPC::Connection&, const Vector<WebCore::Cookie>& cookies); |
383 | using Reply = std::tuple<Vector<WebCore::Cookie>&>; |
384 | using ReplyArguments = std::tuple<Vector<WebCore::Cookie>>; |
385 | GetRawCookies(const PAL::SessionID& sessionID, const URL& firstParty, const WebCore::SameSiteInfo& sameSiteInfo, const URL& url, const Optional<uint64_t>& frameID, const Optional<WebCore::PageIdentifier>& pageID) |
386 | : m_arguments(sessionID, firstParty, sameSiteInfo, url, frameID, pageID) |
387 | { |
388 | } |
389 | |
390 | const Arguments& arguments() const |
391 | { |
392 | return m_arguments; |
393 | } |
394 | |
395 | private: |
396 | Arguments m_arguments; |
397 | }; |
398 | |
399 | class DeleteCookie { |
400 | public: |
401 | typedef std::tuple<const PAL::SessionID&, const URL&, const String&> Arguments; |
402 | |
403 | static IPC::StringReference receiverName() { return messageReceiverName(); } |
404 | static IPC::StringReference name() { return IPC::StringReference("DeleteCookie" ); } |
405 | static const bool isSync = false; |
406 | |
407 | DeleteCookie(const PAL::SessionID& sessionID, const URL& url, const String& cookieName) |
408 | : m_arguments(sessionID, url, cookieName) |
409 | { |
410 | } |
411 | |
412 | const Arguments& arguments() const |
413 | { |
414 | return m_arguments; |
415 | } |
416 | |
417 | private: |
418 | Arguments m_arguments; |
419 | }; |
420 | |
421 | class RegisterFileBlobURL { |
422 | public: |
423 | typedef std::tuple<const URL&, const String&, const WebKit::SandboxExtension::Handle&, const String&> Arguments; |
424 | |
425 | static IPC::StringReference receiverName() { return messageReceiverName(); } |
426 | static IPC::StringReference name() { return IPC::StringReference("RegisterFileBlobURL" ); } |
427 | static const bool isSync = false; |
428 | |
429 | RegisterFileBlobURL(const URL& url, const String& path, const WebKit::SandboxExtension::Handle& extensionHandle, const String& contentType) |
430 | : m_arguments(url, path, extensionHandle, contentType) |
431 | { |
432 | } |
433 | |
434 | const Arguments& arguments() const |
435 | { |
436 | return m_arguments; |
437 | } |
438 | |
439 | private: |
440 | Arguments m_arguments; |
441 | }; |
442 | |
443 | class RegisterBlobURL { |
444 | public: |
445 | typedef std::tuple<const URL&, const Vector<WebCore::BlobPart>&, const String&> Arguments; |
446 | |
447 | static IPC::StringReference receiverName() { return messageReceiverName(); } |
448 | static IPC::StringReference name() { return IPC::StringReference("RegisterBlobURL" ); } |
449 | static const bool isSync = false; |
450 | |
451 | RegisterBlobURL(const URL& url, const Vector<WebCore::BlobPart>& blobParts, const String& contentType) |
452 | : m_arguments(url, blobParts, contentType) |
453 | { |
454 | } |
455 | |
456 | const Arguments& arguments() const |
457 | { |
458 | return m_arguments; |
459 | } |
460 | |
461 | private: |
462 | Arguments m_arguments; |
463 | }; |
464 | |
465 | class RegisterBlobURLFromURL { |
466 | public: |
467 | typedef std::tuple<const URL&, const URL&, bool> Arguments; |
468 | |
469 | static IPC::StringReference receiverName() { return messageReceiverName(); } |
470 | static IPC::StringReference name() { return IPC::StringReference("RegisterBlobURLFromURL" ); } |
471 | static const bool isSync = false; |
472 | |
473 | RegisterBlobURLFromURL(const URL& url, const URL& srcURL, bool shouldBypassConnectionCheck) |
474 | : m_arguments(url, srcURL, shouldBypassConnectionCheck) |
475 | { |
476 | } |
477 | |
478 | const Arguments& arguments() const |
479 | { |
480 | return m_arguments; |
481 | } |
482 | |
483 | private: |
484 | Arguments m_arguments; |
485 | }; |
486 | |
487 | class RegisterBlobURLOptionallyFileBacked { |
488 | public: |
489 | typedef std::tuple<const URL&, const URL&, const String&, const String&> Arguments; |
490 | |
491 | static IPC::StringReference receiverName() { return messageReceiverName(); } |
492 | static IPC::StringReference name() { return IPC::StringReference("RegisterBlobURLOptionallyFileBacked" ); } |
493 | static const bool isSync = false; |
494 | |
495 | RegisterBlobURLOptionallyFileBacked(const URL& url, const URL& srcURL, const String& fileBackedPath, const String& contentType) |
496 | : m_arguments(url, srcURL, fileBackedPath, contentType) |
497 | { |
498 | } |
499 | |
500 | const Arguments& arguments() const |
501 | { |
502 | return m_arguments; |
503 | } |
504 | |
505 | private: |
506 | Arguments m_arguments; |
507 | }; |
508 | |
509 | class RegisterBlobURLForSlice { |
510 | public: |
511 | typedef std::tuple<const URL&, const URL&, int64_t, int64_t> Arguments; |
512 | |
513 | static IPC::StringReference receiverName() { return messageReceiverName(); } |
514 | static IPC::StringReference name() { return IPC::StringReference("RegisterBlobURLForSlice" ); } |
515 | static const bool isSync = false; |
516 | |
517 | RegisterBlobURLForSlice(const URL& url, const URL& srcURL, int64_t start, int64_t end) |
518 | : m_arguments(url, srcURL, start, end) |
519 | { |
520 | } |
521 | |
522 | const Arguments& arguments() const |
523 | { |
524 | return m_arguments; |
525 | } |
526 | |
527 | private: |
528 | Arguments m_arguments; |
529 | }; |
530 | |
531 | class UnregisterBlobURL { |
532 | public: |
533 | typedef std::tuple<const URL&> Arguments; |
534 | |
535 | static IPC::StringReference receiverName() { return messageReceiverName(); } |
536 | static IPC::StringReference name() { return IPC::StringReference("UnregisterBlobURL" ); } |
537 | static const bool isSync = false; |
538 | |
539 | explicit UnregisterBlobURL(const URL& url) |
540 | : m_arguments(url) |
541 | { |
542 | } |
543 | |
544 | const Arguments& arguments() const |
545 | { |
546 | return m_arguments; |
547 | } |
548 | |
549 | private: |
550 | Arguments m_arguments; |
551 | }; |
552 | |
553 | class BlobSize { |
554 | public: |
555 | typedef std::tuple<const URL&> Arguments; |
556 | |
557 | static IPC::StringReference receiverName() { return messageReceiverName(); } |
558 | static IPC::StringReference name() { return IPC::StringReference("BlobSize" ); } |
559 | static const bool isSync = true; |
560 | |
561 | using DelayedReply = CompletionHandler<void(uint64_t resultSize)>; |
562 | static void send(std::unique_ptr<IPC::Encoder>&&, IPC::Connection&, uint64_t resultSize); |
563 | using Reply = std::tuple<uint64_t&>; |
564 | using ReplyArguments = std::tuple<uint64_t>; |
565 | explicit BlobSize(const URL& url) |
566 | : m_arguments(url) |
567 | { |
568 | } |
569 | |
570 | const Arguments& arguments() const |
571 | { |
572 | return m_arguments; |
573 | } |
574 | |
575 | private: |
576 | Arguments m_arguments; |
577 | }; |
578 | |
579 | class WriteBlobsToTemporaryFiles { |
580 | public: |
581 | typedef std::tuple<const Vector<String>&> Arguments; |
582 | |
583 | static IPC::StringReference receiverName() { return messageReceiverName(); } |
584 | static IPC::StringReference name() { return IPC::StringReference("WriteBlobsToTemporaryFiles" ); } |
585 | static const bool isSync = false; |
586 | |
587 | static void callReply(IPC::Decoder&, CompletionHandler<void(Vector<String>&&)>&&); |
588 | static void cancelReply(CompletionHandler<void(Vector<String>&&)>&&); |
589 | static IPC::StringReference asyncMessageReplyName() { return { "WriteBlobsToTemporaryFilesReply" }; } |
590 | using AsyncReply = CompletionHandler<void(const Vector<String>& fileNames)>; |
591 | static void send(std::unique_ptr<IPC::Encoder>&&, IPC::Connection&, const Vector<String>& fileNames); |
592 | using Reply = std::tuple<Vector<String>&>; |
593 | using ReplyArguments = std::tuple<Vector<String>>; |
594 | explicit WriteBlobsToTemporaryFiles(const Vector<String>& blobURLs) |
595 | : m_arguments(blobURLs) |
596 | { |
597 | } |
598 | |
599 | const Arguments& arguments() const |
600 | { |
601 | return m_arguments; |
602 | } |
603 | |
604 | private: |
605 | Arguments m_arguments; |
606 | }; |
607 | |
608 | class { |
609 | public: |
610 | typedef std::tuple<bool> ; |
611 | |
612 | static IPC::StringReference () { return messageReceiverName(); } |
613 | static IPC::StringReference () { return IPC::StringReference("SetCaptureExtraNetworkLoadMetricsEnabled" ); } |
614 | static const bool = false; |
615 | |
616 | explicit (bool enabled) |
617 | : m_arguments(enabled) |
618 | { |
619 | } |
620 | |
621 | const Arguments& () const |
622 | { |
623 | return m_arguments; |
624 | } |
625 | |
626 | private: |
627 | Arguments ; |
628 | }; |
629 | |
630 | class CreateSocketStream { |
631 | public: |
632 | typedef std::tuple<const URL&, const PAL::SessionID&, const String&, uint64_t> Arguments; |
633 | |
634 | static IPC::StringReference receiverName() { return messageReceiverName(); } |
635 | static IPC::StringReference name() { return IPC::StringReference("CreateSocketStream" ); } |
636 | static const bool isSync = false; |
637 | |
638 | CreateSocketStream(const URL& url, const PAL::SessionID& sessionID, const String& cachePartition, uint64_t identifier) |
639 | : m_arguments(url, sessionID, cachePartition, identifier) |
640 | { |
641 | } |
642 | |
643 | const Arguments& arguments() const |
644 | { |
645 | return m_arguments; |
646 | } |
647 | |
648 | private: |
649 | Arguments m_arguments; |
650 | }; |
651 | |
652 | class CreateSocketChannel { |
653 | public: |
654 | typedef std::tuple<const PAL::SessionID&, const WebCore::ResourceRequest&, const String&, uint64_t> Arguments; |
655 | |
656 | static IPC::StringReference receiverName() { return messageReceiverName(); } |
657 | static IPC::StringReference name() { return IPC::StringReference("CreateSocketChannel" ); } |
658 | static const bool isSync = false; |
659 | |
660 | CreateSocketChannel(const PAL::SessionID& sessionID, const WebCore::ResourceRequest& request, const String& protocol, uint64_t identifier) |
661 | : m_arguments(sessionID, request, protocol, identifier) |
662 | { |
663 | } |
664 | |
665 | const Arguments& arguments() const |
666 | { |
667 | return m_arguments; |
668 | } |
669 | |
670 | private: |
671 | Arguments m_arguments; |
672 | }; |
673 | |
674 | class EnsureLegacyPrivateBrowsingSession { |
675 | public: |
676 | typedef std::tuple<> Arguments; |
677 | |
678 | static IPC::StringReference receiverName() { return messageReceiverName(); } |
679 | static IPC::StringReference name() { return IPC::StringReference("EnsureLegacyPrivateBrowsingSession" ); } |
680 | static const bool isSync = false; |
681 | |
682 | const Arguments& arguments() const |
683 | { |
684 | return m_arguments; |
685 | } |
686 | |
687 | private: |
688 | Arguments m_arguments; |
689 | }; |
690 | |
691 | #if ENABLE(RESOURCE_LOAD_STATISTICS) |
692 | class RemoveStorageAccessForFrame { |
693 | public: |
694 | typedef std::tuple<const PAL::SessionID&, uint64_t, const WebCore::PageIdentifier&> Arguments; |
695 | |
696 | static IPC::StringReference receiverName() { return messageReceiverName(); } |
697 | static IPC::StringReference name() { return IPC::StringReference("RemoveStorageAccessForFrame" ); } |
698 | static const bool isSync = false; |
699 | |
700 | RemoveStorageAccessForFrame(const PAL::SessionID& sessionID, uint64_t frameID, const WebCore::PageIdentifier& pageID) |
701 | : m_arguments(sessionID, frameID, pageID) |
702 | { |
703 | } |
704 | |
705 | const Arguments& arguments() const |
706 | { |
707 | return m_arguments; |
708 | } |
709 | |
710 | private: |
711 | Arguments m_arguments; |
712 | }; |
713 | #endif |
714 | |
715 | #if ENABLE(RESOURCE_LOAD_STATISTICS) |
716 | class ClearPageSpecificDataForResourceLoadStatistics { |
717 | public: |
718 | typedef std::tuple<const PAL::SessionID&, const WebCore::PageIdentifier&> Arguments; |
719 | |
720 | static IPC::StringReference receiverName() { return messageReceiverName(); } |
721 | static IPC::StringReference name() { return IPC::StringReference("ClearPageSpecificDataForResourceLoadStatistics" ); } |
722 | static const bool isSync = false; |
723 | |
724 | ClearPageSpecificDataForResourceLoadStatistics(const PAL::SessionID& sessionID, const WebCore::PageIdentifier& pageID) |
725 | : m_arguments(sessionID, pageID) |
726 | { |
727 | } |
728 | |
729 | const Arguments& arguments() const |
730 | { |
731 | return m_arguments; |
732 | } |
733 | |
734 | private: |
735 | Arguments m_arguments; |
736 | }; |
737 | #endif |
738 | |
739 | #if ENABLE(RESOURCE_LOAD_STATISTICS) |
740 | class LogUserInteraction { |
741 | public: |
742 | typedef std::tuple<const PAL::SessionID&, const WebCore::RegistrableDomain&> Arguments; |
743 | |
744 | static IPC::StringReference receiverName() { return messageReceiverName(); } |
745 | static IPC::StringReference name() { return IPC::StringReference("LogUserInteraction" ); } |
746 | static const bool isSync = false; |
747 | |
748 | LogUserInteraction(const PAL::SessionID& sessionID, const WebCore::RegistrableDomain& domain) |
749 | : m_arguments(sessionID, domain) |
750 | { |
751 | } |
752 | |
753 | const Arguments& arguments() const |
754 | { |
755 | return m_arguments; |
756 | } |
757 | |
758 | private: |
759 | Arguments m_arguments; |
760 | }; |
761 | #endif |
762 | |
763 | #if ENABLE(RESOURCE_LOAD_STATISTICS) |
764 | class LogWebSocketLoading { |
765 | public: |
766 | typedef std::tuple<const PAL::SessionID&, const WebCore::RegistrableDomain&, const WebCore::RegistrableDomain&, const WallTime&> Arguments; |
767 | |
768 | static IPC::StringReference receiverName() { return messageReceiverName(); } |
769 | static IPC::StringReference name() { return IPC::StringReference("LogWebSocketLoading" ); } |
770 | static const bool isSync = false; |
771 | |
772 | LogWebSocketLoading(const PAL::SessionID& sessionID, const WebCore::RegistrableDomain& targetDomain, const WebCore::RegistrableDomain& topFrameDomain, const WallTime& lastSeen) |
773 | : m_arguments(sessionID, targetDomain, topFrameDomain, lastSeen) |
774 | { |
775 | } |
776 | |
777 | const Arguments& arguments() const |
778 | { |
779 | return m_arguments; |
780 | } |
781 | |
782 | private: |
783 | Arguments m_arguments; |
784 | }; |
785 | #endif |
786 | |
787 | #if ENABLE(RESOURCE_LOAD_STATISTICS) |
788 | class LogSubresourceLoading { |
789 | public: |
790 | typedef std::tuple<const PAL::SessionID&, const WebCore::RegistrableDomain&, const WebCore::RegistrableDomain&, const WallTime&> Arguments; |
791 | |
792 | static IPC::StringReference receiverName() { return messageReceiverName(); } |
793 | static IPC::StringReference name() { return IPC::StringReference("LogSubresourceLoading" ); } |
794 | static const bool isSync = false; |
795 | |
796 | LogSubresourceLoading(const PAL::SessionID& sessionID, const WebCore::RegistrableDomain& targetDomain, const WebCore::RegistrableDomain& topFrameDomain, const WallTime& lastSeen) |
797 | : m_arguments(sessionID, targetDomain, topFrameDomain, lastSeen) |
798 | { |
799 | } |
800 | |
801 | const Arguments& arguments() const |
802 | { |
803 | return m_arguments; |
804 | } |
805 | |
806 | private: |
807 | Arguments m_arguments; |
808 | }; |
809 | #endif |
810 | |
811 | #if ENABLE(RESOURCE_LOAD_STATISTICS) |
812 | class LogSubresourceRedirect { |
813 | public: |
814 | typedef std::tuple<const PAL::SessionID&, const WebCore::RegistrableDomain&, const WebCore::RegistrableDomain&> Arguments; |
815 | |
816 | static IPC::StringReference receiverName() { return messageReceiverName(); } |
817 | static IPC::StringReference name() { return IPC::StringReference("LogSubresourceRedirect" ); } |
818 | static const bool isSync = false; |
819 | |
820 | LogSubresourceRedirect(const PAL::SessionID& sessionID, const WebCore::RegistrableDomain& sourceDomain, const WebCore::RegistrableDomain& targetDomain) |
821 | : m_arguments(sessionID, sourceDomain, targetDomain) |
822 | { |
823 | } |
824 | |
825 | const Arguments& arguments() const |
826 | { |
827 | return m_arguments; |
828 | } |
829 | |
830 | private: |
831 | Arguments m_arguments; |
832 | }; |
833 | #endif |
834 | |
835 | #if ENABLE(RESOURCE_LOAD_STATISTICS) |
836 | class ResourceLoadStatisticsUpdated { |
837 | public: |
838 | typedef std::tuple<const Vector<WebCore::ResourceLoadStatistics>&> Arguments; |
839 | |
840 | static IPC::StringReference receiverName() { return messageReceiverName(); } |
841 | static IPC::StringReference name() { return IPC::StringReference("ResourceLoadStatisticsUpdated" ); } |
842 | static const bool isSync = false; |
843 | |
844 | explicit ResourceLoadStatisticsUpdated(const Vector<WebCore::ResourceLoadStatistics>& statistics) |
845 | : m_arguments(statistics) |
846 | { |
847 | } |
848 | |
849 | const Arguments& arguments() const |
850 | { |
851 | return m_arguments; |
852 | } |
853 | |
854 | private: |
855 | Arguments m_arguments; |
856 | }; |
857 | #endif |
858 | |
859 | #if ENABLE(RESOURCE_LOAD_STATISTICS) |
860 | class HasStorageAccess { |
861 | public: |
862 | typedef std::tuple<const PAL::SessionID&, const WebCore::RegistrableDomain&, const WebCore::RegistrableDomain&, uint64_t, const WebCore::PageIdentifier&> Arguments; |
863 | |
864 | static IPC::StringReference receiverName() { return messageReceiverName(); } |
865 | static IPC::StringReference name() { return IPC::StringReference("HasStorageAccess" ); } |
866 | static const bool isSync = false; |
867 | |
868 | static void callReply(IPC::Decoder&, CompletionHandler<void(bool&&)>&&); |
869 | static void cancelReply(CompletionHandler<void(bool&&)>&&); |
870 | static IPC::StringReference asyncMessageReplyName() { return { "HasStorageAccessReply" }; } |
871 | using AsyncReply = CompletionHandler<void(bool hasStorageAccess)>; |
872 | static void send(std::unique_ptr<IPC::Encoder>&&, IPC::Connection&, bool hasStorageAccess); |
873 | using Reply = std::tuple<bool&>; |
874 | using ReplyArguments = std::tuple<bool>; |
875 | HasStorageAccess(const PAL::SessionID& sessionID, const WebCore::RegistrableDomain& subFrameDomain, const WebCore::RegistrableDomain& topFrameDomain, uint64_t frameID, const WebCore::PageIdentifier& pageID) |
876 | : m_arguments(sessionID, subFrameDomain, topFrameDomain, frameID, pageID) |
877 | { |
878 | } |
879 | |
880 | const Arguments& arguments() const |
881 | { |
882 | return m_arguments; |
883 | } |
884 | |
885 | private: |
886 | Arguments m_arguments; |
887 | }; |
888 | #endif |
889 | |
890 | #if ENABLE(RESOURCE_LOAD_STATISTICS) |
891 | class RequestStorageAccess { |
892 | public: |
893 | typedef std::tuple<const PAL::SessionID&, const WebCore::RegistrableDomain&, const WebCore::RegistrableDomain&, uint64_t, const WebCore::PageIdentifier&> Arguments; |
894 | |
895 | static IPC::StringReference receiverName() { return messageReceiverName(); } |
896 | static IPC::StringReference name() { return IPC::StringReference("RequestStorageAccess" ); } |
897 | static const bool isSync = false; |
898 | |
899 | static void callReply(IPC::Decoder&, CompletionHandler<void(WebCore::StorageAccessWasGranted&&, WebCore::StorageAccessPromptWasShown&&)>&&); |
900 | static void cancelReply(CompletionHandler<void(WebCore::StorageAccessWasGranted&&, WebCore::StorageAccessPromptWasShown&&)>&&); |
901 | static IPC::StringReference asyncMessageReplyName() { return { "RequestStorageAccessReply" }; } |
902 | using AsyncReply = CompletionHandler<void(WebCore::StorageAccessWasGranted wasGranted, WebCore::StorageAccessPromptWasShown promptWasShown)>; |
903 | static void send(std::unique_ptr<IPC::Encoder>&&, IPC::Connection&, WebCore::StorageAccessWasGranted wasGranted, WebCore::StorageAccessPromptWasShown promptWasShown); |
904 | using Reply = std::tuple<WebCore::StorageAccessWasGranted&, WebCore::StorageAccessPromptWasShown&>; |
905 | using ReplyArguments = std::tuple<WebCore::StorageAccessWasGranted, WebCore::StorageAccessPromptWasShown>; |
906 | RequestStorageAccess(const PAL::SessionID& sessionID, const WebCore::RegistrableDomain& subFrameDomain, const WebCore::RegistrableDomain& topFrameDomain, uint64_t frameID, const WebCore::PageIdentifier& pageID) |
907 | : m_arguments(sessionID, subFrameDomain, topFrameDomain, frameID, pageID) |
908 | { |
909 | } |
910 | |
911 | const Arguments& arguments() const |
912 | { |
913 | return m_arguments; |
914 | } |
915 | |
916 | private: |
917 | Arguments m_arguments; |
918 | }; |
919 | #endif |
920 | |
921 | #if ENABLE(RESOURCE_LOAD_STATISTICS) |
922 | class RequestStorageAccessUnderOpener { |
923 | public: |
924 | typedef std::tuple<const PAL::SessionID&, const WebCore::RegistrableDomain&, const WebCore::PageIdentifier&, const WebCore::RegistrableDomain&> Arguments; |
925 | |
926 | static IPC::StringReference receiverName() { return messageReceiverName(); } |
927 | static IPC::StringReference name() { return IPC::StringReference("RequestStorageAccessUnderOpener" ); } |
928 | static const bool isSync = false; |
929 | |
930 | RequestStorageAccessUnderOpener(const PAL::SessionID& sessionID, const WebCore::RegistrableDomain& domainInNeedOfStorageAccess, const WebCore::PageIdentifier& openerPageID, const WebCore::RegistrableDomain& openerDomain) |
931 | : m_arguments(sessionID, domainInNeedOfStorageAccess, openerPageID, openerDomain) |
932 | { |
933 | } |
934 | |
935 | const Arguments& arguments() const |
936 | { |
937 | return m_arguments; |
938 | } |
939 | |
940 | private: |
941 | Arguments m_arguments; |
942 | }; |
943 | #endif |
944 | |
945 | class AddOriginAccessWhitelistEntry { |
946 | public: |
947 | typedef std::tuple<const String&, const String&, const String&, bool> Arguments; |
948 | |
949 | static IPC::StringReference receiverName() { return messageReceiverName(); } |
950 | static IPC::StringReference name() { return IPC::StringReference("AddOriginAccessWhitelistEntry" ); } |
951 | static const bool isSync = false; |
952 | |
953 | AddOriginAccessWhitelistEntry(const String& sourceOrigin, const String& destinationProtocol, const String& destinationHost, bool allowDestinationSubdomains) |
954 | : m_arguments(sourceOrigin, destinationProtocol, destinationHost, allowDestinationSubdomains) |
955 | { |
956 | } |
957 | |
958 | const Arguments& arguments() const |
959 | { |
960 | return m_arguments; |
961 | } |
962 | |
963 | private: |
964 | Arguments m_arguments; |
965 | }; |
966 | |
967 | class RemoveOriginAccessWhitelistEntry { |
968 | public: |
969 | typedef std::tuple<const String&, const String&, const String&, bool> Arguments; |
970 | |
971 | static IPC::StringReference receiverName() { return messageReceiverName(); } |
972 | static IPC::StringReference name() { return IPC::StringReference("RemoveOriginAccessWhitelistEntry" ); } |
973 | static const bool isSync = false; |
974 | |
975 | RemoveOriginAccessWhitelistEntry(const String& sourceOrigin, const String& destinationProtocol, const String& destinationHost, bool allowDestinationSubdomains) |
976 | : m_arguments(sourceOrigin, destinationProtocol, destinationHost, allowDestinationSubdomains) |
977 | { |
978 | } |
979 | |
980 | const Arguments& arguments() const |
981 | { |
982 | return m_arguments; |
983 | } |
984 | |
985 | private: |
986 | Arguments m_arguments; |
987 | }; |
988 | |
989 | class ResetOriginAccessWhitelists { |
990 | public: |
991 | typedef std::tuple<> Arguments; |
992 | |
993 | static IPC::StringReference receiverName() { return messageReceiverName(); } |
994 | static IPC::StringReference name() { return IPC::StringReference("ResetOriginAccessWhitelists" ); } |
995 | static const bool isSync = false; |
996 | |
997 | const Arguments& arguments() const |
998 | { |
999 | return m_arguments; |
1000 | } |
1001 | |
1002 | private: |
1003 | Arguments m_arguments; |
1004 | }; |
1005 | |
1006 | class GetNetworkLoadInformationRequest { |
1007 | public: |
1008 | typedef std::tuple<uint64_t> Arguments; |
1009 | |
1010 | static IPC::StringReference receiverName() { return messageReceiverName(); } |
1011 | static IPC::StringReference name() { return IPC::StringReference("GetNetworkLoadInformationRequest" ); } |
1012 | static const bool isSync = true; |
1013 | |
1014 | using DelayedReply = CompletionHandler<void(const WebCore::ResourceRequest& request)>; |
1015 | static void send(std::unique_ptr<IPC::Encoder>&&, IPC::Connection&, const WebCore::ResourceRequest& request); |
1016 | using Reply = std::tuple<WebCore::ResourceRequest&>; |
1017 | using ReplyArguments = std::tuple<WebCore::ResourceRequest>; |
1018 | explicit GetNetworkLoadInformationRequest(uint64_t resourceLoadIdentifier) |
1019 | : m_arguments(resourceLoadIdentifier) |
1020 | { |
1021 | } |
1022 | |
1023 | const Arguments& arguments() const |
1024 | { |
1025 | return m_arguments; |
1026 | } |
1027 | |
1028 | private: |
1029 | Arguments m_arguments; |
1030 | }; |
1031 | |
1032 | class GetNetworkLoadInformationResponse { |
1033 | public: |
1034 | typedef std::tuple<uint64_t> Arguments; |
1035 | |
1036 | static IPC::StringReference receiverName() { return messageReceiverName(); } |
1037 | static IPC::StringReference name() { return IPC::StringReference("GetNetworkLoadInformationResponse" ); } |
1038 | static const bool isSync = true; |
1039 | |
1040 | using DelayedReply = CompletionHandler<void(const WebCore::ResourceResponse& response)>; |
1041 | static void send(std::unique_ptr<IPC::Encoder>&&, IPC::Connection&, const WebCore::ResourceResponse& response); |
1042 | using Reply = std::tuple<WebCore::ResourceResponse&>; |
1043 | using ReplyArguments = std::tuple<WebCore::ResourceResponse>; |
1044 | explicit GetNetworkLoadInformationResponse(uint64_t resourceLoadIdentifier) |
1045 | : m_arguments(resourceLoadIdentifier) |
1046 | { |
1047 | } |
1048 | |
1049 | const Arguments& arguments() const |
1050 | { |
1051 | return m_arguments; |
1052 | } |
1053 | |
1054 | private: |
1055 | Arguments m_arguments; |
1056 | }; |
1057 | |
1058 | class GetNetworkLoadIntermediateInformation { |
1059 | public: |
1060 | typedef std::tuple<uint64_t> Arguments; |
1061 | |
1062 | static IPC::StringReference receiverName() { return messageReceiverName(); } |
1063 | static IPC::StringReference name() { return IPC::StringReference("GetNetworkLoadIntermediateInformation" ); } |
1064 | static const bool isSync = true; |
1065 | |
1066 | using DelayedReply = CompletionHandler<void(const Vector<WebCore::NetworkTransactionInformation>& transactions)>; |
1067 | static void send(std::unique_ptr<IPC::Encoder>&&, IPC::Connection&, const Vector<WebCore::NetworkTransactionInformation>& transactions); |
1068 | using Reply = std::tuple<Vector<WebCore::NetworkTransactionInformation>&>; |
1069 | using ReplyArguments = std::tuple<Vector<WebCore::NetworkTransactionInformation>>; |
1070 | explicit GetNetworkLoadIntermediateInformation(uint64_t resourceLoadIdentifier) |
1071 | : m_arguments(resourceLoadIdentifier) |
1072 | { |
1073 | } |
1074 | |
1075 | const Arguments& arguments() const |
1076 | { |
1077 | return m_arguments; |
1078 | } |
1079 | |
1080 | private: |
1081 | Arguments m_arguments; |
1082 | }; |
1083 | |
1084 | class TakeNetworkLoadInformationMetrics { |
1085 | public: |
1086 | typedef std::tuple<uint64_t> Arguments; |
1087 | |
1088 | static IPC::StringReference receiverName() { return messageReceiverName(); } |
1089 | static IPC::StringReference name() { return IPC::StringReference("TakeNetworkLoadInformationMetrics" ); } |
1090 | static const bool isSync = true; |
1091 | |
1092 | using DelayedReply = CompletionHandler<void(const WebCore::NetworkLoadMetrics& networkMetrics)>; |
1093 | static void send(std::unique_ptr<IPC::Encoder>&&, IPC::Connection&, const WebCore::NetworkLoadMetrics& networkMetrics); |
1094 | using Reply = std::tuple<WebCore::NetworkLoadMetrics&>; |
1095 | using ReplyArguments = std::tuple<WebCore::NetworkLoadMetrics>; |
1096 | explicit TakeNetworkLoadInformationMetrics(uint64_t resourceLoadIdentifier) |
1097 | : m_arguments(resourceLoadIdentifier) |
1098 | { |
1099 | } |
1100 | |
1101 | const Arguments& arguments() const |
1102 | { |
1103 | return m_arguments; |
1104 | } |
1105 | |
1106 | private: |
1107 | Arguments m_arguments; |
1108 | }; |
1109 | |
1110 | #if ENABLE(INDEXED_DATABASE) |
1111 | class EstablishIDBConnectionToServer { |
1112 | public: |
1113 | typedef std::tuple<const PAL::SessionID&> Arguments; |
1114 | |
1115 | static IPC::StringReference receiverName() { return messageReceiverName(); } |
1116 | static IPC::StringReference name() { return IPC::StringReference("EstablishIDBConnectionToServer" ); } |
1117 | static const bool isSync = true; |
1118 | |
1119 | using DelayedReply = CompletionHandler<void(uint64_t serverConnectionIdentifier)>; |
1120 | static void send(std::unique_ptr<IPC::Encoder>&&, IPC::Connection&, uint64_t serverConnectionIdentifier); |
1121 | using Reply = std::tuple<uint64_t&>; |
1122 | using ReplyArguments = std::tuple<uint64_t>; |
1123 | explicit EstablishIDBConnectionToServer(const PAL::SessionID& sessionID) |
1124 | : m_arguments(sessionID) |
1125 | { |
1126 | } |
1127 | |
1128 | const Arguments& arguments() const |
1129 | { |
1130 | return m_arguments; |
1131 | } |
1132 | |
1133 | private: |
1134 | Arguments m_arguments; |
1135 | }; |
1136 | #endif |
1137 | |
1138 | #if ENABLE(SERVICE_WORKER) |
1139 | class EstablishSWServerConnection { |
1140 | public: |
1141 | typedef std::tuple<const PAL::SessionID&> Arguments; |
1142 | |
1143 | static IPC::StringReference receiverName() { return messageReceiverName(); } |
1144 | static IPC::StringReference name() { return IPC::StringReference("EstablishSWServerConnection" ); } |
1145 | static const bool isSync = true; |
1146 | |
1147 | using DelayedReply = CompletionHandler<void(const WebCore::SWServerConnectionIdentifier& serverConnectionIdentifier)>; |
1148 | static void send(std::unique_ptr<IPC::Encoder>&&, IPC::Connection&, const WebCore::SWServerConnectionIdentifier& serverConnectionIdentifier); |
1149 | using Reply = std::tuple<WebCore::SWServerConnectionIdentifier&>; |
1150 | using ReplyArguments = std::tuple<WebCore::SWServerConnectionIdentifier>; |
1151 | explicit EstablishSWServerConnection(const PAL::SessionID& sessionID) |
1152 | : m_arguments(sessionID) |
1153 | { |
1154 | } |
1155 | |
1156 | const Arguments& arguments() const |
1157 | { |
1158 | return m_arguments; |
1159 | } |
1160 | |
1161 | private: |
1162 | Arguments m_arguments; |
1163 | }; |
1164 | #endif |
1165 | |
1166 | class WebPageWasAdded { |
1167 | public: |
1168 | typedef std::tuple<const PAL::SessionID&, const WebCore::PageIdentifier&, const WebCore::PageIdentifier&> Arguments; |
1169 | |
1170 | static IPC::StringReference receiverName() { return messageReceiverName(); } |
1171 | static IPC::StringReference name() { return IPC::StringReference("WebPageWasAdded" ); } |
1172 | static const bool isSync = false; |
1173 | |
1174 | WebPageWasAdded(const PAL::SessionID& sessionID, const WebCore::PageIdentifier& pageID, const WebCore::PageIdentifier& oldPageID) |
1175 | : m_arguments(sessionID, pageID, oldPageID) |
1176 | { |
1177 | } |
1178 | |
1179 | const Arguments& arguments() const |
1180 | { |
1181 | return m_arguments; |
1182 | } |
1183 | |
1184 | private: |
1185 | Arguments m_arguments; |
1186 | }; |
1187 | |
1188 | class WebPageWasRemoved { |
1189 | public: |
1190 | typedef std::tuple<const PAL::SessionID&, const WebCore::PageIdentifier&> Arguments; |
1191 | |
1192 | static IPC::StringReference receiverName() { return messageReceiverName(); } |
1193 | static IPC::StringReference name() { return IPC::StringReference("WebPageWasRemoved" ); } |
1194 | static const bool isSync = false; |
1195 | |
1196 | WebPageWasRemoved(const PAL::SessionID& sessionID, const WebCore::PageIdentifier& pageID) |
1197 | : m_arguments(sessionID, pageID) |
1198 | { |
1199 | } |
1200 | |
1201 | const Arguments& arguments() const |
1202 | { |
1203 | return m_arguments; |
1204 | } |
1205 | |
1206 | private: |
1207 | Arguments m_arguments; |
1208 | }; |
1209 | |
1210 | class WebProcessSessionChanged { |
1211 | public: |
1212 | typedef std::tuple<const PAL::SessionID&, const Vector<WebCore::PageIdentifier>&> Arguments; |
1213 | |
1214 | static IPC::StringReference receiverName() { return messageReceiverName(); } |
1215 | static IPC::StringReference name() { return IPC::StringReference("WebProcessSessionChanged" ); } |
1216 | static const bool isSync = false; |
1217 | |
1218 | WebProcessSessionChanged(const PAL::SessionID& newSessionID, const Vector<WebCore::PageIdentifier>& pages) |
1219 | : m_arguments(newSessionID, pages) |
1220 | { |
1221 | } |
1222 | |
1223 | const Arguments& arguments() const |
1224 | { |
1225 | return m_arguments; |
1226 | } |
1227 | |
1228 | private: |
1229 | Arguments m_arguments; |
1230 | }; |
1231 | |
1232 | } // namespace NetworkConnectionToWebProcess |
1233 | } // namespace Messages |
1234 | |