NeckoChannelParams.ipdlh (23882B)
1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ 2 /* vim: set sw=2 ts=8 et tw=80 ft=c: */ 3 4 /* This Source Code Form is subject to the terms of the Mozilla Public 5 * License, v. 2.0. If a copy of the MPL was not distributed with this 6 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 7 8 include protocol PHttpChannel; 9 include ClientIPCTypes; 10 include URIParams; 11 include IPCServiceWorkerDescriptor; 12 include IPCStream; 13 include PBackgroundSharedTypes; 14 include DOMTypes; 15 include ProtocolTypes; 16 17 include "mozilla/dom/DomSecurityIPCUtils.h"; 18 include "mozilla/dom/FetchIPCTypes.h"; 19 include "mozilla/dom/FeaturePolicyUtils.h"; 20 include "mozilla/dom/NavigationAPIIPCUtils.h"; 21 include "mozilla/dom/PropertyBagUtils.h"; 22 include "mozilla/dom/ReferrerInfoUtils.h"; 23 include "mozilla/ipc/URIUtils.h"; 24 include "mozilla/net/CacheInfoIPCTypes.h"; 25 include "mozilla/AntiTrackingIPCUtils.h"; 26 include "mozilla/net/ClassOfService.h"; 27 28 using mozilla::OriginAttributes from "mozilla/ipc/BackgroundUtils.h"; 29 using mozilla::net::RequestHeaderTuples from "mozilla/net/PHttpChannelParams.h"; 30 using struct nsHttpAtom from "nsHttp.h"; 31 [MoveOnly] using class mozilla::net::nsHttpResponseHead from "nsHttpResponseHead.h"; 32 using class mozilla::TimeStamp from "mozilla/TimeStamp.h"; 33 [RefCounted] using class nsIPropertyBag2 from "nsIPropertyBag2.h"; 34 [RefCounted] using class nsDOMNavigationTiming from "nsDOMNavigationTiming.h"; 35 [RefCounted] using class nsDocShellLoadState from "nsDocShellLoadState.h"; 36 using nsContentPolicyType from "nsIContentPolicy.h"; 37 using mozilla::net::PreferredAlternativeDataDeliveryTypeIPC from "nsICacheInfoChannel.h"; 38 using mozilla::dom::ForceMediaDocument from "mozilla/dom/LoadURIOptionsBinding.h"; 39 using nsILoadInfo::CrossOriginEmbedderPolicy from "nsILoadInfo.h"; 40 using nsILoadInfo::StoragePermissionState from "nsILoadInfo.h"; 41 using nsILoadInfo::IPAddressSpace from "nsILoadInfo.h"; 42 using struct mozilla::dom::LoadingSessionHistoryInfo from "mozilla/dom/SessionHistoryEntry.h"; 43 using mozilla::dom::RequestMode from "mozilla/dom/RequestBinding.h"; 44 using mozilla::net::LinkHeader from "nsNetUtil.h"; 45 using mozilla::dom::FeaturePolicyInfo from "mozilla/dom/FeaturePolicy.h"; 46 using nsILoadInfo::HTTPSUpgradeTelemetryType from "nsILoadInfo.h"; 47 using nsILoadInfo::SchemelessInputType from "nsILoadInfo.h"; 48 using mozilla::dom::UserNavigationInvolvement from "mozilla/dom/UserNavigationInvolvement.h"; 49 using mozilla::RFPTargetSet from "nsRFPService.h"; 50 51 namespace mozilla { 52 namespace net { 53 54 //----------------------------------------------------------------------------- 55 // CookieJarSettings IPDL structs 56 //----------------------------------------------------------------------------- 57 58 struct CookiePermissionData 59 { 60 PrincipalInfo principalInfo; 61 uint32_t cookiePermission; 62 }; 63 64 struct CookieJarSettingsArgs 65 { 66 // Copy of the cookie jar settings for the top-level document. 67 uint32_t cookieBehavior; 68 bool isFirstPartyIsolated; 69 bool shouldResistFingerprinting; 70 bool isOnContentBlockingAllowList; 71 CookiePermissionData[] cookiePermissions; 72 bool isFixed; 73 nsString partitionKey; 74 bool hasFingerprintingRandomizationKey; 75 uint8_t[] fingerprintingRandomizationKey; 76 uint64_t topLevelWindowContextId; 77 }; 78 79 //----------------------------------------------------------------------------- 80 // CookieChange 81 //----------------------------------------------------------------------------- 82 83 struct CookieChange 84 { 85 bool added; 86 CookieStruct cookie; 87 OriginAttributes originAttributes; 88 }; 89 90 //----------------------------------------------------------------------------- 91 // Preferrer alternative data type 92 //----------------------------------------------------------------------------- 93 94 struct PreferredAlternativeDataTypeParams 95 { 96 nsCString type; 97 nsCString contentType; 98 PreferredAlternativeDataDeliveryTypeIPC deliverAltData; 99 }; 100 101 //----------------------------------------------------------------------------- 102 // LoadInfo IPDL structs 103 //----------------------------------------------------------------------------- 104 105 struct RedirectHistoryEntryInfo 106 { 107 PrincipalInfo principalInfo; 108 URIParams? referrerUri; 109 nsCString remoteAddress; 110 }; 111 112 struct InterceptionInfoArg 113 { 114 PrincipalInfo? triggeringPrincipalInfo; 115 nsContentPolicyType contentPolicyType; 116 RedirectHistoryEntryInfo[] redirectChain; 117 bool fromThirdParty; 118 }; 119 120 struct LoadInfoArgs 121 { 122 PrincipalInfo? requestingPrincipalInfo; 123 PrincipalInfo triggeringPrincipalInfo; 124 PrincipalInfo? principalToInheritInfo; 125 PrincipalInfo? topLevelPrincipalInfo; 126 URIParams? resultPrincipalURI; 127 nsCString triggeringRemoteType; 128 nsID sandboxedNullPrincipalID; 129 uint32_t securityFlags; 130 uint32_t sandboxFlags; 131 uint32_t triggeringSandboxFlags; 132 uint64_t triggeringWindowId; 133 bool triggeringStorageAccess; 134 uint32_t triggeringFirstPartyClassificationFlags; 135 uint32_t triggeringThirdPartyClassificationFlags; 136 nsContentPolicyType contentPolicyType; 137 uint32_t tainting; 138 bool blockAllMixedContent; 139 bool upgradeInsecureRequests; 140 bool browserUpgradeInsecureRequests; 141 bool browserDidUpgradeInsecureRequests; 142 bool browserWouldUpgradeInsecureRequests; 143 bool forceAllowDataURI; 144 bool allowInsecureRedirectToDataURI; 145 ForceMediaDocument forceMediaDocument; 146 bool skipContentPolicyCheckForWebRequest; 147 bool originalFrameSrcLoad; 148 bool forceInheritPrincipalDropped; 149 uint64_t innerWindowID; 150 uint64_t browsingContextID; 151 uint64_t frameBrowsingContextID; 152 bool initialSecurityCheckDone; 153 bool isInThirdPartyContext; 154 bool? isThirdPartyContextToTopWindow; 155 bool isOn3PCBExceptionList; 156 bool isFormSubmission; 157 bool isGETRequest; 158 bool sendCSPViolationEvents; 159 OriginAttributes originAttributes; 160 RedirectHistoryEntryInfo[] redirectChainIncludingInternalRedirects; 161 RedirectHistoryEntryInfo[] redirectChain; 162 bool hasInjectedCookieForCookieBannerHandling; 163 SchemelessInputType schemelessInput; 164 HTTPSUpgradeTelemetryType httpsUpgradeTelemetry; 165 166 /** 167 * ClientInfo structure representing the window or worker that triggered 168 * this network request. May be Nothing if its a system internal request. 169 */ 170 IPCClientInfo? clientInfo; 171 172 /** 173 * Non-subresource requests will result in the creation of a window or 174 * worker client. The reserved and initial ClientInfo values represent 175 * this resulting client. An initial ClientInfo represents an initial 176 * about:blank window that will be re-used while a reserved ClientInfo 177 * represents a to-be-newly-created window/worker. 178 */ 179 IPCClientInfo? reservedClientInfo; 180 IPCClientInfo? initialClientInfo; 181 182 /** 183 * Subresource loads may have a controller set based on their owning 184 * window/worker client. We must send this across IPC to support 185 * performing interception in the parent. 186 */ 187 IPCServiceWorkerDescriptor? controller; 188 189 nsCString[] corsUnsafeHeaders; 190 bool forcePreflight; 191 bool isPreflight; 192 bool loadTriggeredFromExternal; 193 bool serviceWorkerTaintingSynthesized; 194 bool documentHasUserInteracted; 195 bool allowListFutureDocumentsCreatedFromThisRedirectChain; 196 bool needForCheckingAntiTrackingHeuristic; 197 nsString cspNonce; 198 nsString integrityMetadata; 199 bool skipContentSniffing; 200 uint32_t httpsOnlyStatus; 201 bool hstsStatus; 202 bool hasValidUserGestureActivation; 203 bool textDirectiveUserActivation; 204 bool allowDeprecatedSystemRequests; 205 bool isInDevToolsContext; 206 bool parserCreatedScript; 207 RequestMode? requestMode; 208 bool isFromProcessingFrameAttributes; 209 bool isMediaRequest; 210 bool isMediaInitialRequest; 211 bool isFromObjectOrEmbed; 212 CookieJarSettingsArgs cookieJarSettings; 213 uint32_t requestBlockingReason; 214 PolicyContainerArgs? policyContainerToInherit; 215 StoragePermissionState storagePermission; 216 IPAddressSpace parentIPAddressSpace; 217 IPAddressSpace ipAddressSpace; 218 RFPTargetSet? overriddenFingerprintingSettings; 219 bool isMetaRefresh; 220 CrossOriginEmbedderPolicy loadingEmbedderPolicy; 221 bool originTrialCoepCredentiallessEnabledForTopLevel; 222 nullable nsIURI unstrippedURI; 223 InterceptionInfoArg? interceptionInfo; 224 bool isNewWindowTarget; 225 UserNavigationInvolvement userNavigationInvolvement; 226 FeaturePolicyInfo? containerFeaturePolicyInfo; 227 // https://html.spec.whatwg.org/#dom-location-ancestororigins 228 PrincipalInfo?[] ancestorOrigins; 229 }; 230 231 /** 232 * This structure is used to carry selected properties of a LoadInfo 233 * object to child processes to merge LoadInfo changes from the parent 234 * process. We don't want to use LoadInfoArgs for that since it's 235 * too huge and we only care about small subpart of properties anyway. 236 */ 237 struct ParentLoadInfoForwarderArgs 238 { 239 // WebExtextensions' WebRequest API allows extensions to intercept and 240 // redirect a channel to a data URI. This modifications happens in 241 // the parent and needs to be mirrored to the child so that security 242 // checks can pass. 243 bool allowInsecureRedirectToDataURI; 244 245 // The ServiceWorker controller that may be set in the parent when 246 // interception occurs. 247 IPCServiceWorkerDescriptor? controller; 248 249 // The service worker may synthesize a Response with a particular 250 // tainting value. 251 uint32_t tainting; 252 253 // This flag is used for any browsing context where we should not sniff 254 // the content type. E.g if an iframe has the XCTO nosniff header, then 255 // that flag is set to true so we skip content sniffing for that browsing 256 bool skipContentSniffing; 257 258 uint32_t httpsOnlyStatus; 259 260 SchemelessInputType schemelessInput; 261 262 HTTPSUpgradeTelemetryType httpsUpgradeTelemetry; 263 264 bool hstsStatus; 265 266 // Returns true if at the time of the loadinfo construction the document 267 // that triggered this load has the bit hasValidTransientUserGestureActivation 268 // set or the load was triggered from External. (Mostly this bool is used 269 // in the context of Sec-Fetch-User.) 270 bool hasValidUserGestureActivation; 271 272 // Returns true if at the time of the loadinfo construction the document 273 // that triggered this load has an user activation, so that if the new 274 // document has a text fragment, its first text directive can be scrolled to. 275 bool textDirectiveUserActivation; 276 277 // The SystemPrincipal is disallowed to make requests to the public web 278 // and all requests will be cancelled. Setting this flag to true prevents 279 // the request from being cancelled. 280 bool allowDeprecatedSystemRequests; 281 282 bool isInDevToolsContext; 283 284 // Only ever returns true if the loadinfo is of TYPE_SCRIPT and 285 // the script was created by the HTML parser. 286 bool parserCreatedScript; 287 288 RequestMode? requestMode; 289 290 // Sandbox Flags of the Document that triggered the load 291 uint32_t triggeringSandboxFlags; 292 293 // Window ID and UsingStorageAccess of the Document that triggered the load. 294 // Used by the Storage Access API to determine if SubDocument loads should 295 // be partitioned or not. 296 uint64_t triggeringWindowId; 297 bool triggeringStorageAccess; 298 299 // We must also note that the tainting value was explicitly set 300 // by the service worker. 301 bool serviceWorkerTaintingSynthesized; 302 303 bool documentHasUserInteracted; 304 bool allowListFutureDocumentsCreatedFromThisRedirectChain; 305 306 CookieJarSettingsArgs? cookieJarSettings; 307 308 FeaturePolicyInfo? containerFeaturePolicyInfo; 309 310 uint32_t requestBlockingReason; 311 312 StoragePermissionState storagePermission; 313 314 RFPTargetSet? overriddenFingerprintingSettings; 315 316 bool isMetaRefresh; 317 318 bool? isThirdPartyContextToTopWindow; 319 320 bool isInThirdPartyContext; 321 322 bool isOn3PCBExceptionList; 323 324 nullable nsIURI unstrippedURI; 325 326 UserNavigationInvolvement userNavigationInvolvement; 327 328 // IMPORTANT: when you add new properites here you must also update 329 // LoadInfoToParentLoadInfoForwarder and MergeParentLoadInfoForwarder 330 // in BackgroundUtils.cpp/.h! 331 }; 332 333 /** 334 * This structure is used to carry selected properties of a LoadInfo 335 * object to the parent process that might have changed in the child 336 * during a redirect. We don't want to use LoadInfoArgs for that since 337 * it's too huge and we only care about small subpart of properties 338 * anyway. 339 */ 340 struct ChildLoadInfoForwarderArgs 341 { 342 // The reserved and initial ClientInfo values may change during a 343 // redirect if the new channel is cross-origin to the old channel. 344 IPCClientInfo? reservedClientInfo; 345 IPCClientInfo? initialClientInfo; 346 347 // The ServiceWorker controller may be cleared in the child during 348 // a redirect. 349 IPCServiceWorkerDescriptor? controller; 350 351 uint32_t requestBlockingReason; 352 }; 353 354 //----------------------------------------------------------------------------- 355 // HTTP IPDL structs 356 //----------------------------------------------------------------------------- 357 358 struct CorsPreflightArgs 359 { 360 nsCString[] unsafeHeaders; 361 }; 362 363 struct HttpChannelOpenArgs 364 { 365 nullable nsIURI uri; 366 // - TODO: bug 571161: unclear if any HTTP channel clients ever 367 // set originalURI != uri (about:credits?); also not clear if 368 // chrome channel would ever need to know. Get rid of next arg? 369 nullable nsIURI original; 370 nullable nsIURI doc; 371 nullable nsIReferrerInfo referrerInfo; 372 nullable nsIURI apiRedirectTo; 373 nullable nsIURI topWindowURI; 374 RequestHeaderTuples requestHeaders; 375 PreferredAlternativeDataTypeParams[] preferredAlternativeTypes; 376 TimeStamp launchServiceWorkerStart; 377 TimeStamp launchServiceWorkerEnd; 378 TimeStamp dispatchFetchEventStart; 379 TimeStamp dispatchFetchEventEnd; 380 TimeStamp handleFetchEventStart; 381 TimeStamp handleFetchEventEnd; 382 TimeStamp navigationStartTimeStamp; 383 uint64_t startPos; 384 uint64_t requestContextID; 385 uint64_t channelId; 386 uint64_t contentWindowId; 387 uint64_t browserId; 388 uint64_t earlyHintPreloaderId; 389 nsCString requestMethod; 390 ClassOfService classOfService; 391 nsCString entityID; 392 nsCString appCacheClientID; 393 CorsPreflightArgs? preflightArgs; 394 nsCString contentTypeHint; 395 IPCStream? uploadStream; 396 LoadInfoArgs loadInfo; 397 uint32_t loadFlags; 398 uint32_t thirdPartyFlags; 399 uint32_t tlsFlags; 400 uint32_t cacheKey; 401 uint32_t initialRwin; 402 uint32_t redirectMode; 403 int16_t priority; 404 bool uploadStreamHasHeaders; 405 bool allowSTS; 406 bool resumeAt; 407 bool allowSpdy; 408 bool allowHttp3; 409 bool allowAltSvc; 410 bool beConservative; 411 bool bypassProxy; 412 bool blockAuthPrompt; 413 bool allowStaleCacheContent; 414 RequestMode requestMode; 415 bool forceValidateCacheContent; 416 bool preferCacheLoadOverBypass; 417 bool forceMainDocumentChannel; 418 uint8_t redirectionLimit; 419 nsString classicScriptHintCharset; 420 nsString documentCharacterSet; 421 bool isUserAgentHeaderModified; 422 nsString initiatorType; 423 }; 424 425 struct HttpChannelConnectArgs 426 { 427 uint32_t registrarId; 428 }; 429 430 union HttpChannelCreationArgs 431 { 432 HttpChannelOpenArgs; // For AsyncOpen: the common case. 433 HttpChannelConnectArgs; // Used for redirected-to channels 434 }; 435 436 struct ProxyInfoCloneArgs 437 { 438 nsCString type; 439 nsCString host; 440 int32_t port; 441 nsCString masqueTemplate; 442 nsCString alpn; 443 nsCString username; 444 nsCString password; 445 uint32_t flags; 446 uint32_t timeout; 447 uint32_t resolveFlags; 448 nsCString proxyAuthorizationHeader; 449 nsCString connectionIsolationKey; 450 }; 451 452 struct HttpConnectionInfoCloneArgs 453 { 454 nsCString host; 455 int32_t port; 456 nsCString npnToken; 457 nsCString username; 458 OriginAttributes originAttributes; 459 bool endToEndSSL; 460 nsCString routedHost; 461 int32_t routedPort; 462 bool anonymous; 463 bool aPrivate; // use prefix to avoid code generation error 464 bool insecureScheme; 465 bool noSpdy; 466 bool beConservative; 467 bool bypassProxy; 468 bool anonymousAllowClientCert; 469 bool fallbackConnection; 470 uint32_t tlsFlags; 471 bool isolated; 472 bool isTrrServiceChannel; 473 uint8_t trrMode; 474 bool isIPv4Disabled; 475 bool isIPv6Disabled; 476 nsCString topWindowOrigin; 477 bool isHttp3; 478 bool webTransport; 479 uint64_t webTransportId; 480 bool hasIPHintAddress; 481 nsCString echConfig; 482 ProxyInfoCloneArgs[] proxyInfo; 483 }; 484 485 struct ConsoleReportCollected { 486 uint32_t errorFlags; 487 nsCString category; 488 uint32_t propertiesFile; 489 nsCString sourceFileURI; 490 uint32_t lineNumber; 491 uint32_t columnNumber; 492 nsCString messageName; 493 nsString[] stringParams; 494 }; 495 496 struct CookieStruct 497 { 498 nsCString name; 499 nsCString value; 500 nsCString host; 501 nsCString path; 502 int64_t expiryInMSec; 503 int64_t lastAccessedInUSec; 504 int64_t creationTimeInUSec; 505 int64_t updateTimeInUSec; 506 bool isHttpOnly; 507 bool isSession; 508 bool isSecure; 509 bool isPartitioned; 510 int32_t sameSite; 511 uint8_t schemeMap; 512 }; 513 514 struct CookieStructTable 515 { 516 OriginAttributes attrs; 517 CookieStruct[] cookies; 518 }; 519 520 struct DocumentCreationArgs { 521 uint32_t loadFlags; 522 bool uriModified; 523 bool isEmbeddingBlockedError; 524 }; 525 526 struct ObjectCreationArgs { 527 uint32_t loadFlags; 528 uint64_t embedderInnerWindowId; 529 nsContentPolicyType contentPolicyType; 530 bool isUrgentStart; 531 }; 532 533 union DocumentChannelElementCreationArgs { 534 DocumentCreationArgs; 535 ObjectCreationArgs; 536 }; 537 538 struct DocumentChannelCreationArgs { 539 nsDocShellLoadState loadState; 540 TimeStamp asyncOpenTime; 541 uint64_t channelId; 542 uint32_t cacheKey; 543 nullable nsDOMNavigationTiming timing; 544 IPCClientInfo? initialClientInfo; 545 DocumentChannelElementCreationArgs elementCreationArgs; 546 uint64_t parentInitiatedNavigationEpoch; 547 }; 548 549 struct EarlyHintConnectArgs { 550 LinkHeader link; 551 uint64_t earlyHintPreloaderId; 552 }; 553 554 struct RedirectToRealChannelArgs { 555 uint32_t registrarId; 556 nullable nsIURI uri; 557 uint32_t newLoadFlags; 558 ReplacementChannelConfigInit? init; 559 LoadInfoArgs loadInfo; 560 uint64_t channelId; 561 nullable nsIURI originalURI; 562 uint32_t redirectMode; 563 uint32_t redirectFlags; 564 uint32_t? contentDisposition; 565 nsString? contentDispositionFilename; 566 nullable nsIPropertyBag2 properties; 567 uint32_t loadStateExternalLoadFlags; 568 uint32_t loadStateInternalLoadFlags; 569 uint32_t loadStateLoadType; 570 nullable nsDOMNavigationTiming timing; 571 nsString srcdocData; 572 nullable nsIURI baseUri; 573 LoadingSessionHistoryInfo? loadingSessionHistoryInfo; 574 uint64_t loadIdentifier; 575 nsCString? originalUriString; 576 EarlyHintConnectArgs[] earlyHints; 577 uint32_t earlyHintLinkType; 578 nullable nsIReferrerInfo referrerInfo; 579 }; 580 581 struct TimingStructArgs { 582 TimeStamp domainLookupStart; 583 TimeStamp domainLookupEnd; 584 TimeStamp connectStart; 585 TimeStamp tcpConnectEnd; 586 TimeStamp secureConnectionStart; 587 TimeStamp connectEnd; 588 TimeStamp requestStart; 589 TimeStamp responseStart; 590 TimeStamp responseEnd; 591 TimeStamp transactionPending; 592 }; 593 594 struct ResourceTimingStructArgs { 595 TimeStamp domainLookupStart; 596 TimeStamp domainLookupEnd; 597 TimeStamp connectStart; 598 TimeStamp tcpConnectEnd; 599 TimeStamp secureConnectionStart; 600 TimeStamp connectEnd; 601 TimeStamp requestStart; 602 TimeStamp responseStart; 603 TimeStamp responseEnd; 604 TimeStamp fetchStart; 605 TimeStamp redirectStart; 606 TimeStamp redirectEnd; 607 uint64_t transferSize; 608 uint64_t encodedBodySize; 609 uint64_t decodedBodySize; 610 611 // Not actually part of resource timing, but not part of the transaction 612 // timings either. These need to be passed to HttpChannelChild along with 613 // the rest of the timings so the timing information in the child is complete. 614 TimeStamp cacheReadStart; 615 TimeStamp cacheReadEnd; 616 617 TimeStamp transactionPending; 618 }; 619 620 struct HttpActivity 621 { 622 nsCString host; 623 int32_t port; 624 bool endToEndSSL; 625 }; 626 627 struct HttpConnectionActivity 628 { 629 nsCString connInfoKey; 630 nsCString host; 631 int32_t port; 632 bool ssl; 633 bool hasECH; 634 bool isHttp3; 635 }; 636 637 union HttpActivityArgs 638 { 639 uint64_t; 640 HttpActivity; 641 HttpConnectionActivity; 642 }; 643 644 struct TransactionObserverResult 645 { 646 bool versionOk; 647 bool authOk; 648 nsresult closeReason; 649 }; 650 651 struct SpeculativeConnectionOverriderArgs { 652 uint32_t parallelSpeculativeConnectLimit; 653 bool ignoreIdle; 654 bool allow1918; 655 }; 656 657 //----------------------------------------------------------------------------- 658 // GIO IPDL structs 659 //----------------------------------------------------------------------------- 660 661 struct GIOChannelOpenArgs 662 { 663 URIParams uri; 664 uint64_t startPos; 665 nsCString entityID; 666 IPCStream? uploadStream; 667 LoadInfoArgs loadInfo; 668 uint32_t loadFlags; 669 }; 670 671 struct GIOChannelConnectArgs 672 { 673 uint32_t channelId; 674 }; 675 676 union GIOChannelCreationArgs 677 { 678 GIOChannelOpenArgs; // For AsyncOpen: the common case. 679 GIOChannelConnectArgs; // Used for redirected-to channels 680 }; 681 682 //----------------------------------------------------------------------------- 683 // File IPDL structs 684 //----------------------------------------------------------------------------- 685 686 struct FileChannelInfo 687 { 688 nullable nsIURI uri; 689 nullable nsIURI originalURI; 690 uint32_t loadFlags; 691 LoadInfoArgs loadInfo; 692 nsCString contentType; 693 uint64_t channelId; 694 }; 695 696 //----------------------------------------------------------------------------- 697 // GeckoView's Android Content IPDL structs 698 //----------------------------------------------------------------------------- 699 700 struct GeckoViewContentChannelOpenArgs 701 { 702 URIParams uri; 703 LoadInfoArgs loadInfo; 704 uint32_t loadFlags; 705 }; 706 707 struct GeckoViewContentChannelConnectArgs 708 { 709 uint32_t channelId; 710 }; 711 712 union GeckoViewContentChannelArgs 713 { 714 GeckoViewContentChannelOpenArgs; 715 GeckoViewContentChannelConnectArgs; 716 }; 717 718 struct RemoteStreamInfo { 719 nullable nsIInputStream inputStream; 720 nsCString contentType; 721 int64_t contentLength; 722 }; 723 } // namespace net 724 } // namespace mozilla