tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

FetchTypes.ipdlh (3801B)


      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/. */
      4 
      5 include IPCStream;
      6 include PBackgroundSharedTypes;
      7 include PerformanceTimingTypes;
      8 include NeckoChannelParams;
      9 
     10 include "mozilla/dom/FetchIPCTypes.h";
     11 include "mozilla/ipc/TransportSecurityInfoUtils.h";
     12 
     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::RequestPriority from "mozilla/dom/RequestBinding.h";
     19 using mozilla::dom::ResponseType from "mozilla/dom/ResponseBinding.h";
     20 using struct nsID from "nsID.h";
     21 using mozilla::dom::FetchDriverObserver::EndReason from "mozilla/dom/FetchDriver.h";
     22 using nsContentPolicyType from "nsIContentPolicy.h";
     23 using nsILoadInfo::CrossOriginEmbedderPolicy from "nsILoadInfo.h";
     24 [RefCounted] using class mozilla::RemoteLazyInputStream from "mozilla/RemoteLazyInputStream.h";
     25 [RefCounted] using class nsITransportSecurityInfo from "nsITransportSecurityInfo.h";
     26 
     27 namespace mozilla {
     28 namespace dom {
     29 
     30 struct HeadersEntry {
     31   nsCString name;
     32   nsCString value;
     33 };
     34 
     35 struct ParentToParentStream {
     36   // Used as a key for RemoteLazyInputStreamStorage
     37   nsID uuid;
     38 };
     39 
     40 union ParentToChildStream {
     41   nullable RemoteLazyInputStream;
     42   IPCStream;
     43 };
     44 
     45 struct ChildToParentStream {
     46   IPCStream stream;
     47 };
     48 
     49 union BodyStreamVariant {
     50   ParentToParentStream;
     51   ParentToChildStream;
     52   ChildToParentStream;
     53 };
     54 
     55 struct IPCInternalRequest {
     56   nsCString method;
     57   nsCString[] urlList;
     58   HeadersGuardEnum headersGuard;
     59   HeadersEntry[] headers;
     60   BodyStreamVariant? body;
     61   int64_t bodySize;
     62   nsCString preferredAlternativeDataType;
     63   nsContentPolicyType contentPolicyType;
     64   int32_t internalPriority;
     65   nsCString referrer;
     66   ReferrerPolicy referrerPolicy;
     67   ReferrerPolicy environmentReferrerPolicy;
     68   RequestMode requestMode;
     69   RequestCredentials requestCredentials;
     70   RequestCache cacheMode;
     71   RequestRedirect requestRedirect;
     72   RequestPriority requestPriority;
     73   nsString integrity;
     74   bool keepalive;
     75   nsCString fragment;
     76   PrincipalInfo? principalInfo;
     77   PrincipalInfo? interceptionTriggeringPrincipalInfo;
     78   nsContentPolicyType interceptionContentPolicyType;
     79   RedirectHistoryEntryInfo[] interceptionRedirectChain;
     80   bool interceptionFromThirdParty;
     81   CrossOriginEmbedderPolicy embedderPolicy;
     82 };
     83 
     84 struct InternalResponseMetadata {
     85   ResponseType type;
     86   nsCString[] urlList;
     87   uint16_t status;
     88   nsCString statusText;
     89   HeadersGuardEnum headersGuard;
     90   HeadersEntry[] headers;
     91   nsresult errorCode;
     92   nsCString alternativeDataType;
     93   nullable nsITransportSecurityInfo securityInfo;
     94   PrincipalInfo? principalInfo;
     95   nsCString bodyBlobURISpec;
     96   nsString bodyLocalPath;
     97   RequestCredentials credentialsMode;
     98 };
     99 
    100 struct ParentToParentInternalResponse {
    101   InternalResponseMetadata metadata;
    102   ParentToParentStream? body;
    103   int64_t bodySize;
    104   ParentToParentStream? alternativeBody;
    105 };
    106 
    107 struct ParentToChildInternalResponse {
    108   InternalResponseMetadata metadata;
    109   ParentToChildStream? body;
    110   int64_t bodySize;
    111   ParentToChildStream? alternativeBody;
    112 };
    113 
    114 struct ChildToParentInternalResponse {
    115   InternalResponseMetadata metadata;
    116   ChildToParentStream? body;
    117   int64_t bodySize;
    118   ChildToParentStream? alternativeBody;
    119 };
    120 
    121 struct ResponseTiming {
    122   IPCPerformanceTimingData timingData;
    123   nsString initiatorType;
    124   nsString entryName;
    125 };
    126 
    127 struct ResponseEndArgs {
    128   EndReason endReason;
    129 };
    130 
    131 } // namespace ipc
    132 } // namespace mozilla