| 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/ProcessIdentifier.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<uint64_t> 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(uint64_t 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<uint64_t>&, 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<uint64_t>& 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<uint64_t>&, 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<uint64_t>& 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<uint64_t>&, 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<uint64_t>& 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<uint64_t>&> 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<uint64_t>& 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 EnsureLegacyPrivateBrowsingSession { |
| 653 | public: |
| 654 | typedef std::tuple<> Arguments; |
| 655 | |
| 656 | static IPC::StringReference receiverName() { return messageReceiverName(); } |
| 657 | static IPC::StringReference name() { return IPC::StringReference("EnsureLegacyPrivateBrowsingSession" ); } |
| 658 | static const bool isSync = false; |
| 659 | |
| 660 | const Arguments& arguments() const |
| 661 | { |
| 662 | return m_arguments; |
| 663 | } |
| 664 | |
| 665 | private: |
| 666 | Arguments m_arguments; |
| 667 | }; |
| 668 | |
| 669 | #if ENABLE(RESOURCE_LOAD_STATISTICS) |
| 670 | class RemoveStorageAccessForFrame { |
| 671 | public: |
| 672 | typedef std::tuple<const PAL::SessionID&, uint64_t, uint64_t> Arguments; |
| 673 | |
| 674 | static IPC::StringReference receiverName() { return messageReceiverName(); } |
| 675 | static IPC::StringReference name() { return IPC::StringReference("RemoveStorageAccessForFrame" ); } |
| 676 | static const bool isSync = false; |
| 677 | |
| 678 | RemoveStorageAccessForFrame(const PAL::SessionID& sessionID, uint64_t frameID, uint64_t pageID) |
| 679 | : m_arguments(sessionID, frameID, pageID) |
| 680 | { |
| 681 | } |
| 682 | |
| 683 | const Arguments& arguments() const |
| 684 | { |
| 685 | return m_arguments; |
| 686 | } |
| 687 | |
| 688 | private: |
| 689 | Arguments m_arguments; |
| 690 | }; |
| 691 | #endif |
| 692 | |
| 693 | #if ENABLE(RESOURCE_LOAD_STATISTICS) |
| 694 | class ClearPageSpecificDataForResourceLoadStatistics { |
| 695 | public: |
| 696 | typedef std::tuple<const PAL::SessionID&, uint64_t> Arguments; |
| 697 | |
| 698 | static IPC::StringReference receiverName() { return messageReceiverName(); } |
| 699 | static IPC::StringReference name() { return IPC::StringReference("ClearPageSpecificDataForResourceLoadStatistics" ); } |
| 700 | static const bool isSync = false; |
| 701 | |
| 702 | ClearPageSpecificDataForResourceLoadStatistics(const PAL::SessionID& sessionID, uint64_t pageID) |
| 703 | : m_arguments(sessionID, pageID) |
| 704 | { |
| 705 | } |
| 706 | |
| 707 | const Arguments& arguments() const |
| 708 | { |
| 709 | return m_arguments; |
| 710 | } |
| 711 | |
| 712 | private: |
| 713 | Arguments m_arguments; |
| 714 | }; |
| 715 | #endif |
| 716 | |
| 717 | #if ENABLE(RESOURCE_LOAD_STATISTICS) |
| 718 | class LogUserInteraction { |
| 719 | public: |
| 720 | typedef std::tuple<const PAL::SessionID&, const WebCore::RegistrableDomain&> Arguments; |
| 721 | |
| 722 | static IPC::StringReference receiverName() { return messageReceiverName(); } |
| 723 | static IPC::StringReference name() { return IPC::StringReference("LogUserInteraction" ); } |
| 724 | static const bool isSync = false; |
| 725 | |
| 726 | LogUserInteraction(const PAL::SessionID& sessionID, const WebCore::RegistrableDomain& domain) |
| 727 | : m_arguments(sessionID, domain) |
| 728 | { |
| 729 | } |
| 730 | |
| 731 | const Arguments& arguments() const |
| 732 | { |
| 733 | return m_arguments; |
| 734 | } |
| 735 | |
| 736 | private: |
| 737 | Arguments m_arguments; |
| 738 | }; |
| 739 | #endif |
| 740 | |
| 741 | #if ENABLE(RESOURCE_LOAD_STATISTICS) |
| 742 | class LogWebSocketLoading { |
| 743 | public: |
| 744 | typedef std::tuple<const PAL::SessionID&, const WebCore::RegistrableDomain&, const WebCore::RegistrableDomain&, const WallTime&> Arguments; |
| 745 | |
| 746 | static IPC::StringReference receiverName() { return messageReceiverName(); } |
| 747 | static IPC::StringReference name() { return IPC::StringReference("LogWebSocketLoading" ); } |
| 748 | static const bool isSync = false; |
| 749 | |
| 750 | LogWebSocketLoading(const PAL::SessionID& sessionID, const WebCore::RegistrableDomain& targetDomain, const WebCore::RegistrableDomain& topFrameDomain, const WallTime& lastSeen) |
| 751 | : m_arguments(sessionID, targetDomain, topFrameDomain, lastSeen) |
| 752 | { |
| 753 | } |
| 754 | |
| 755 | const Arguments& arguments() const |
| 756 | { |
| 757 | return m_arguments; |
| 758 | } |
| 759 | |
| 760 | private: |
| 761 | Arguments m_arguments; |
| 762 | }; |
| 763 | #endif |
| 764 | |
| 765 | #if ENABLE(RESOURCE_LOAD_STATISTICS) |
| 766 | class LogSubresourceLoading { |
| 767 | public: |
| 768 | typedef std::tuple<const PAL::SessionID&, const WebCore::RegistrableDomain&, const WebCore::RegistrableDomain&, const WallTime&> Arguments; |
| 769 | |
| 770 | static IPC::StringReference receiverName() { return messageReceiverName(); } |
| 771 | static IPC::StringReference name() { return IPC::StringReference("LogSubresourceLoading" ); } |
| 772 | static const bool isSync = false; |
| 773 | |
| 774 | LogSubresourceLoading(const PAL::SessionID& sessionID, const WebCore::RegistrableDomain& targetDomain, const WebCore::RegistrableDomain& topFrameDomain, const WallTime& lastSeen) |
| 775 | : m_arguments(sessionID, targetDomain, topFrameDomain, lastSeen) |
| 776 | { |
| 777 | } |
| 778 | |
| 779 | const Arguments& arguments() const |
| 780 | { |
| 781 | return m_arguments; |
| 782 | } |
| 783 | |
| 784 | private: |
| 785 | Arguments m_arguments; |
| 786 | }; |
| 787 | #endif |
| 788 | |
| 789 | #if ENABLE(RESOURCE_LOAD_STATISTICS) |
| 790 | class LogSubresourceRedirect { |
| 791 | public: |
| 792 | typedef std::tuple<const PAL::SessionID&, const WebCore::RegistrableDomain&, const WebCore::RegistrableDomain&> Arguments; |
| 793 | |
| 794 | static IPC::StringReference receiverName() { return messageReceiverName(); } |
| 795 | static IPC::StringReference name() { return IPC::StringReference("LogSubresourceRedirect" ); } |
| 796 | static const bool isSync = false; |
| 797 | |
| 798 | LogSubresourceRedirect(const PAL::SessionID& sessionID, const WebCore::RegistrableDomain& sourceDomain, const WebCore::RegistrableDomain& targetDomain) |
| 799 | : m_arguments(sessionID, sourceDomain, targetDomain) |
| 800 | { |
| 801 | } |
| 802 | |
| 803 | const Arguments& arguments() const |
| 804 | { |
| 805 | return m_arguments; |
| 806 | } |
| 807 | |
| 808 | private: |
| 809 | Arguments m_arguments; |
| 810 | }; |
| 811 | #endif |
| 812 | |
| 813 | #if ENABLE(RESOURCE_LOAD_STATISTICS) |
| 814 | class ResourceLoadStatisticsUpdated { |
| 815 | public: |
| 816 | typedef std::tuple<const Vector<WebCore::ResourceLoadStatistics>&> Arguments; |
| 817 | |
| 818 | static IPC::StringReference receiverName() { return messageReceiverName(); } |
| 819 | static IPC::StringReference name() { return IPC::StringReference("ResourceLoadStatisticsUpdated" ); } |
| 820 | static const bool isSync = false; |
| 821 | |
| 822 | explicit ResourceLoadStatisticsUpdated(const Vector<WebCore::ResourceLoadStatistics>& statistics) |
| 823 | : m_arguments(statistics) |
| 824 | { |
| 825 | } |
| 826 | |
| 827 | const Arguments& arguments() const |
| 828 | { |
| 829 | return m_arguments; |
| 830 | } |
| 831 | |
| 832 | private: |
| 833 | Arguments m_arguments; |
| 834 | }; |
| 835 | #endif |
| 836 | |
| 837 | #if ENABLE(RESOURCE_LOAD_STATISTICS) |
| 838 | class HasStorageAccess { |
| 839 | public: |
| 840 | typedef std::tuple<const PAL::SessionID&, const WebCore::RegistrableDomain&, const WebCore::RegistrableDomain&, uint64_t, uint64_t> Arguments; |
| 841 | |
| 842 | static IPC::StringReference receiverName() { return messageReceiverName(); } |
| 843 | static IPC::StringReference name() { return IPC::StringReference("HasStorageAccess" ); } |
| 844 | static const bool isSync = false; |
| 845 | |
| 846 | static void callReply(IPC::Decoder&, CompletionHandler<void(bool&&)>&&); |
| 847 | static void cancelReply(CompletionHandler<void(bool&&)>&&); |
| 848 | static IPC::StringReference asyncMessageReplyName() { return { "HasStorageAccessReply" }; } |
| 849 | using AsyncReply = CompletionHandler<void(bool hasStorageAccess)>; |
| 850 | static void send(std::unique_ptr<IPC::Encoder>&&, IPC::Connection&, bool hasStorageAccess); |
| 851 | using Reply = std::tuple<bool&>; |
| 852 | using ReplyArguments = std::tuple<bool>; |
| 853 | HasStorageAccess(const PAL::SessionID& sessionID, const WebCore::RegistrableDomain& subFrameDomain, const WebCore::RegistrableDomain& topFrameDomain, uint64_t frameID, uint64_t pageID) |
| 854 | : m_arguments(sessionID, subFrameDomain, topFrameDomain, frameID, pageID) |
| 855 | { |
| 856 | } |
| 857 | |
| 858 | const Arguments& arguments() const |
| 859 | { |
| 860 | return m_arguments; |
| 861 | } |
| 862 | |
| 863 | private: |
| 864 | Arguments m_arguments; |
| 865 | }; |
| 866 | #endif |
| 867 | |
| 868 | #if ENABLE(RESOURCE_LOAD_STATISTICS) |
| 869 | class RequestStorageAccess { |
| 870 | public: |
| 871 | typedef std::tuple<const PAL::SessionID&, const WebCore::RegistrableDomain&, const WebCore::RegistrableDomain&, uint64_t, uint64_t> Arguments; |
| 872 | |
| 873 | static IPC::StringReference receiverName() { return messageReceiverName(); } |
| 874 | static IPC::StringReference name() { return IPC::StringReference("RequestStorageAccess" ); } |
| 875 | static const bool isSync = false; |
| 876 | |
| 877 | static void callReply(IPC::Decoder&, CompletionHandler<void(WebCore::StorageAccessWasGranted&&, WebCore::StorageAccessPromptWasShown&&)>&&); |
| 878 | static void cancelReply(CompletionHandler<void(WebCore::StorageAccessWasGranted&&, WebCore::StorageAccessPromptWasShown&&)>&&); |
| 879 | static IPC::StringReference asyncMessageReplyName() { return { "RequestStorageAccessReply" }; } |
| 880 | using AsyncReply = CompletionHandler<void(WebCore::StorageAccessWasGranted wasGranted, WebCore::StorageAccessPromptWasShown promptWasShown)>; |
| 881 | static void send(std::unique_ptr<IPC::Encoder>&&, IPC::Connection&, WebCore::StorageAccessWasGranted wasGranted, WebCore::StorageAccessPromptWasShown promptWasShown); |
| 882 | using Reply = std::tuple<WebCore::StorageAccessWasGranted&, WebCore::StorageAccessPromptWasShown&>; |
| 883 | using ReplyArguments = std::tuple<WebCore::StorageAccessWasGranted, WebCore::StorageAccessPromptWasShown>; |
| 884 | RequestStorageAccess(const PAL::SessionID& sessionID, const WebCore::RegistrableDomain& subFrameDomain, const WebCore::RegistrableDomain& topFrameDomain, uint64_t frameID, uint64_t pageID) |
| 885 | : m_arguments(sessionID, subFrameDomain, topFrameDomain, frameID, pageID) |
| 886 | { |
| 887 | } |
| 888 | |
| 889 | const Arguments& arguments() const |
| 890 | { |
| 891 | return m_arguments; |
| 892 | } |
| 893 | |
| 894 | private: |
| 895 | Arguments m_arguments; |
| 896 | }; |
| 897 | #endif |
| 898 | |
| 899 | #if ENABLE(RESOURCE_LOAD_STATISTICS) |
| 900 | class RequestStorageAccessUnderOpener { |
| 901 | public: |
| 902 | typedef std::tuple<const PAL::SessionID&, const WebCore::RegistrableDomain&, uint64_t, const WebCore::RegistrableDomain&> Arguments; |
| 903 | |
| 904 | static IPC::StringReference receiverName() { return messageReceiverName(); } |
| 905 | static IPC::StringReference name() { return IPC::StringReference("RequestStorageAccessUnderOpener" ); } |
| 906 | static const bool isSync = false; |
| 907 | |
| 908 | RequestStorageAccessUnderOpener(const PAL::SessionID& sessionID, const WebCore::RegistrableDomain& domainInNeedOfStorageAccess, uint64_t openerPageID, const WebCore::RegistrableDomain& openerDomain) |
| 909 | : m_arguments(sessionID, domainInNeedOfStorageAccess, openerPageID, openerDomain) |
| 910 | { |
| 911 | } |
| 912 | |
| 913 | const Arguments& arguments() const |
| 914 | { |
| 915 | return m_arguments; |
| 916 | } |
| 917 | |
| 918 | private: |
| 919 | Arguments m_arguments; |
| 920 | }; |
| 921 | #endif |
| 922 | |
| 923 | class AddOriginAccessWhitelistEntry { |
| 924 | public: |
| 925 | typedef std::tuple<const String&, const String&, const String&, bool> Arguments; |
| 926 | |
| 927 | static IPC::StringReference receiverName() { return messageReceiverName(); } |
| 928 | static IPC::StringReference name() { return IPC::StringReference("AddOriginAccessWhitelistEntry" ); } |
| 929 | static const bool isSync = false; |
| 930 | |
| 931 | AddOriginAccessWhitelistEntry(const String& sourceOrigin, const String& destinationProtocol, const String& destinationHost, bool allowDestinationSubdomains) |
| 932 | : m_arguments(sourceOrigin, destinationProtocol, destinationHost, allowDestinationSubdomains) |
| 933 | { |
| 934 | } |
| 935 | |
| 936 | const Arguments& arguments() const |
| 937 | { |
| 938 | return m_arguments; |
| 939 | } |
| 940 | |
| 941 | private: |
| 942 | Arguments m_arguments; |
| 943 | }; |
| 944 | |
| 945 | class RemoveOriginAccessWhitelistEntry { |
| 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("RemoveOriginAccessWhitelistEntry" ); } |
| 951 | static const bool isSync = false; |
| 952 | |
| 953 | RemoveOriginAccessWhitelistEntry(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 ResetOriginAccessWhitelists { |
| 968 | public: |
| 969 | typedef std::tuple<> Arguments; |
| 970 | |
| 971 | static IPC::StringReference receiverName() { return messageReceiverName(); } |
| 972 | static IPC::StringReference name() { return IPC::StringReference("ResetOriginAccessWhitelists" ); } |
| 973 | static const bool isSync = false; |
| 974 | |
| 975 | const Arguments& arguments() const |
| 976 | { |
| 977 | return m_arguments; |
| 978 | } |
| 979 | |
| 980 | private: |
| 981 | Arguments m_arguments; |
| 982 | }; |
| 983 | |
| 984 | class GetNetworkLoadInformationRequest { |
| 985 | public: |
| 986 | typedef std::tuple<uint64_t> Arguments; |
| 987 | |
| 988 | static IPC::StringReference receiverName() { return messageReceiverName(); } |
| 989 | static IPC::StringReference name() { return IPC::StringReference("GetNetworkLoadInformationRequest" ); } |
| 990 | static const bool isSync = true; |
| 991 | |
| 992 | using DelayedReply = CompletionHandler<void(const WebCore::ResourceRequest& request)>; |
| 993 | static void send(std::unique_ptr<IPC::Encoder>&&, IPC::Connection&, const WebCore::ResourceRequest& request); |
| 994 | using Reply = std::tuple<WebCore::ResourceRequest&>; |
| 995 | using ReplyArguments = std::tuple<WebCore::ResourceRequest>; |
| 996 | explicit GetNetworkLoadInformationRequest(uint64_t resourceLoadIdentifier) |
| 997 | : m_arguments(resourceLoadIdentifier) |
| 998 | { |
| 999 | } |
| 1000 | |
| 1001 | const Arguments& arguments() const |
| 1002 | { |
| 1003 | return m_arguments; |
| 1004 | } |
| 1005 | |
| 1006 | private: |
| 1007 | Arguments m_arguments; |
| 1008 | }; |
| 1009 | |
| 1010 | class GetNetworkLoadInformationResponse { |
| 1011 | public: |
| 1012 | typedef std::tuple<uint64_t> Arguments; |
| 1013 | |
| 1014 | static IPC::StringReference receiverName() { return messageReceiverName(); } |
| 1015 | static IPC::StringReference name() { return IPC::StringReference("GetNetworkLoadInformationResponse" ); } |
| 1016 | static const bool isSync = true; |
| 1017 | |
| 1018 | using DelayedReply = CompletionHandler<void(const WebCore::ResourceResponse& response)>; |
| 1019 | static void send(std::unique_ptr<IPC::Encoder>&&, IPC::Connection&, const WebCore::ResourceResponse& response); |
| 1020 | using Reply = std::tuple<WebCore::ResourceResponse&>; |
| 1021 | using ReplyArguments = std::tuple<WebCore::ResourceResponse>; |
| 1022 | explicit GetNetworkLoadInformationResponse(uint64_t resourceLoadIdentifier) |
| 1023 | : m_arguments(resourceLoadIdentifier) |
| 1024 | { |
| 1025 | } |
| 1026 | |
| 1027 | const Arguments& arguments() const |
| 1028 | { |
| 1029 | return m_arguments; |
| 1030 | } |
| 1031 | |
| 1032 | private: |
| 1033 | Arguments m_arguments; |
| 1034 | }; |
| 1035 | |
| 1036 | class GetNetworkLoadIntermediateInformation { |
| 1037 | public: |
| 1038 | typedef std::tuple<uint64_t> Arguments; |
| 1039 | |
| 1040 | static IPC::StringReference receiverName() { return messageReceiverName(); } |
| 1041 | static IPC::StringReference name() { return IPC::StringReference("GetNetworkLoadIntermediateInformation" ); } |
| 1042 | static const bool isSync = true; |
| 1043 | |
| 1044 | using DelayedReply = CompletionHandler<void(const Vector<WebCore::NetworkTransactionInformation>& transactions)>; |
| 1045 | static void send(std::unique_ptr<IPC::Encoder>&&, IPC::Connection&, const Vector<WebCore::NetworkTransactionInformation>& transactions); |
| 1046 | using Reply = std::tuple<Vector<WebCore::NetworkTransactionInformation>&>; |
| 1047 | using ReplyArguments = std::tuple<Vector<WebCore::NetworkTransactionInformation>>; |
| 1048 | explicit GetNetworkLoadIntermediateInformation(uint64_t resourceLoadIdentifier) |
| 1049 | : m_arguments(resourceLoadIdentifier) |
| 1050 | { |
| 1051 | } |
| 1052 | |
| 1053 | const Arguments& arguments() const |
| 1054 | { |
| 1055 | return m_arguments; |
| 1056 | } |
| 1057 | |
| 1058 | private: |
| 1059 | Arguments m_arguments; |
| 1060 | }; |
| 1061 | |
| 1062 | class TakeNetworkLoadInformationMetrics { |
| 1063 | public: |
| 1064 | typedef std::tuple<uint64_t> Arguments; |
| 1065 | |
| 1066 | static IPC::StringReference receiverName() { return messageReceiverName(); } |
| 1067 | static IPC::StringReference name() { return IPC::StringReference("TakeNetworkLoadInformationMetrics" ); } |
| 1068 | static const bool isSync = true; |
| 1069 | |
| 1070 | using DelayedReply = CompletionHandler<void(const WebCore::NetworkLoadMetrics& networkMetrics)>; |
| 1071 | static void send(std::unique_ptr<IPC::Encoder>&&, IPC::Connection&, const WebCore::NetworkLoadMetrics& networkMetrics); |
| 1072 | using Reply = std::tuple<WebCore::NetworkLoadMetrics&>; |
| 1073 | using ReplyArguments = std::tuple<WebCore::NetworkLoadMetrics>; |
| 1074 | explicit TakeNetworkLoadInformationMetrics(uint64_t resourceLoadIdentifier) |
| 1075 | : m_arguments(resourceLoadIdentifier) |
| 1076 | { |
| 1077 | } |
| 1078 | |
| 1079 | const Arguments& arguments() const |
| 1080 | { |
| 1081 | return m_arguments; |
| 1082 | } |
| 1083 | |
| 1084 | private: |
| 1085 | Arguments m_arguments; |
| 1086 | }; |
| 1087 | |
| 1088 | #if ENABLE(INDEXED_DATABASE) |
| 1089 | class EstablishIDBConnectionToServer { |
| 1090 | public: |
| 1091 | typedef std::tuple<const PAL::SessionID&> Arguments; |
| 1092 | |
| 1093 | static IPC::StringReference receiverName() { return messageReceiverName(); } |
| 1094 | static IPC::StringReference name() { return IPC::StringReference("EstablishIDBConnectionToServer" ); } |
| 1095 | static const bool isSync = true; |
| 1096 | |
| 1097 | using DelayedReply = CompletionHandler<void(uint64_t serverConnectionIdentifier)>; |
| 1098 | static void send(std::unique_ptr<IPC::Encoder>&&, IPC::Connection&, uint64_t serverConnectionIdentifier); |
| 1099 | using Reply = std::tuple<uint64_t&>; |
| 1100 | using ReplyArguments = std::tuple<uint64_t>; |
| 1101 | explicit EstablishIDBConnectionToServer(const PAL::SessionID& sessionID) |
| 1102 | : m_arguments(sessionID) |
| 1103 | { |
| 1104 | } |
| 1105 | |
| 1106 | const Arguments& arguments() const |
| 1107 | { |
| 1108 | return m_arguments; |
| 1109 | } |
| 1110 | |
| 1111 | private: |
| 1112 | Arguments m_arguments; |
| 1113 | }; |
| 1114 | #endif |
| 1115 | |
| 1116 | #if ENABLE(SERVICE_WORKER) |
| 1117 | class EstablishSWServerConnection { |
| 1118 | public: |
| 1119 | typedef std::tuple<const PAL::SessionID&> Arguments; |
| 1120 | |
| 1121 | static IPC::StringReference receiverName() { return messageReceiverName(); } |
| 1122 | static IPC::StringReference name() { return IPC::StringReference("EstablishSWServerConnection" ); } |
| 1123 | static const bool isSync = true; |
| 1124 | |
| 1125 | using DelayedReply = CompletionHandler<void(const WebCore::SWServerConnectionIdentifier& serverConnectionIdentifier)>; |
| 1126 | static void send(std::unique_ptr<IPC::Encoder>&&, IPC::Connection&, const WebCore::SWServerConnectionIdentifier& serverConnectionIdentifier); |
| 1127 | using Reply = std::tuple<WebCore::SWServerConnectionIdentifier&>; |
| 1128 | using ReplyArguments = std::tuple<WebCore::SWServerConnectionIdentifier>; |
| 1129 | explicit EstablishSWServerConnection(const PAL::SessionID& sessionID) |
| 1130 | : m_arguments(sessionID) |
| 1131 | { |
| 1132 | } |
| 1133 | |
| 1134 | const Arguments& arguments() const |
| 1135 | { |
| 1136 | return m_arguments; |
| 1137 | } |
| 1138 | |
| 1139 | private: |
| 1140 | Arguments m_arguments; |
| 1141 | }; |
| 1142 | #endif |
| 1143 | |
| 1144 | class SetWebProcessIdentifier { |
| 1145 | public: |
| 1146 | typedef std::tuple<const WebCore::ProcessIdentifier&> Arguments; |
| 1147 | |
| 1148 | static IPC::StringReference receiverName() { return messageReceiverName(); } |
| 1149 | static IPC::StringReference name() { return IPC::StringReference("SetWebProcessIdentifier" ); } |
| 1150 | static const bool isSync = false; |
| 1151 | |
| 1152 | explicit SetWebProcessIdentifier(const WebCore::ProcessIdentifier& processIdentifier) |
| 1153 | : m_arguments(processIdentifier) |
| 1154 | { |
| 1155 | } |
| 1156 | |
| 1157 | const Arguments& arguments() const |
| 1158 | { |
| 1159 | return m_arguments; |
| 1160 | } |
| 1161 | |
| 1162 | private: |
| 1163 | Arguments m_arguments; |
| 1164 | }; |
| 1165 | |
| 1166 | } // namespace NetworkConnectionToWebProcess |
| 1167 | } // namespace Messages |
| 1168 | |