1 /* This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this
3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 include PBackgroundSharedTypes;
7 include PerformanceTimingTypes;
8 include NeckoChannelParams;
10 include "mozilla/dom/FetchIPCTypes.h";
11 include "mozilla/ipc/TransportSecurityInfoUtils.h";
13 using mozilla::dom::HeadersGuardEnum from "mozilla/dom/HeadersBinding.h";
14 using mozilla::dom::ReferrerPolicy from "mozilla/dom/ReferrerPolicyBinding.h";
15 using mozilla::dom::RequestCache from "mozilla/dom/RequestBinding.h";
16 using mozilla::dom::RequestCredentials from "mozilla/dom/RequestBinding.h";
17 using mozilla::dom::RequestRedirect from "mozilla/dom/RequestBinding.h";
18 using mozilla::dom::ResponseType from "mozilla/dom/ResponseBinding.h";
19 using struct nsID from "nsID.h";
20 using mozilla::dom::FetchDriverObserver::EndReason from "mozilla/dom/FetchDriver.h";
21 using nsILoadInfo::CrossOriginEmbedderPolicy from "nsILoadInfo.h";
22 [RefCounted] using class mozilla::RemoteLazyInputStream from "mozilla/RemoteLazyInputStream.h";
23 [RefCounted] using class nsITransportSecurityInfo from "nsITransportSecurityInfo.h";
33 struct ParentToParentStream {
34 // Used as a key for RemoteLazyInputStreamStorage
38 union ParentToChildStream {
39 nullable RemoteLazyInputStream;
43 struct ChildToParentStream {
47 union BodyStreamVariant {
53 struct IPCInternalRequest {
56 HeadersGuardEnum headersGuard;
57 HeadersEntry[] headers;
58 BodyStreamVariant? body;
60 nsCString preferredAlternativeDataType;
61 uint32_t contentPolicyType;
63 ReferrerPolicy referrerPolicy;
64 ReferrerPolicy environmentReferrerPolicy;
65 RequestMode requestMode;
66 RequestCredentials requestCredentials;
67 RequestCache cacheMode;
68 RequestRedirect requestRedirect;
71 PrincipalInfo? principalInfo;
72 PrincipalInfo? interceptionTriggeringPrincipalInfo;
73 uint32_t interceptionContentPolicyType;
74 RedirectHistoryEntryInfo[] interceptionRedirectChain;
75 bool interceptionFromThirdParty;
76 CrossOriginEmbedderPolicy embedderPolicy;
79 struct InternalResponseMetadata {
84 HeadersGuardEnum headersGuard;
85 HeadersEntry[] headers;
87 nsCString alternativeDataType;
88 nullable nsITransportSecurityInfo securityInfo;
89 PrincipalInfo? principalInfo;
90 nsCString bodyBlobURISpec;
91 nsString bodyLocalPath;
92 RequestCredentials credentialsMode;
95 struct ParentToParentInternalResponse {
96 InternalResponseMetadata metadata;
97 ParentToParentStream? body;
99 ParentToParentStream? alternativeBody;
102 struct ParentToChildInternalResponse {
103 InternalResponseMetadata metadata;
104 ParentToChildStream? body;
106 ParentToChildStream? alternativeBody;
109 struct ChildToParentInternalResponse {
110 InternalResponseMetadata metadata;
111 ChildToParentStream? body;
113 ChildToParentStream? alternativeBody;
116 struct ResponseTiming {
117 IPCPerformanceTimingData timingData;
118 nsString initiatorType;
122 struct ResponseEndArgs {
127 } // namespace mozilla