NeckoChannelParams.ipdlh 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204
  1. /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  2. /* This Source Code Form is subject to the terms of the Mozilla Public
  3. * License, v. 2.0. If a copy of the MPL was not distributed with this
  4. * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
  5. include protocol PHttpChannel;
  6. include protocol PFTPChannel;
  7. include protocol PRtspChannel;
  8. include protocol PSendStream;
  9. include BlobTypes;
  10. include URIParams;
  11. include IPCStream;
  12. include InputStreamParams;
  13. include PBackgroundSharedTypes;
  14. using mozilla::NeckoOriginAttributes from "mozilla/ipc/BackgroundUtils.h";
  15. using struct mozilla::void_t from "ipc/IPCMessageUtils.h";
  16. using RequestHeaderTuples from "mozilla/net/PHttpChannelParams.h";
  17. using struct nsHttpAtom from "nsHttp.h";
  18. using class nsHttpResponseHead from "nsHttpResponseHead.h";
  19. using class mozilla::TimeStamp from "mozilla/TimeStamp.h";
  20. namespace mozilla {
  21. namespace net {
  22. //-----------------------------------------------------------------------------
  23. // LoadInfo IPDL structs
  24. //-----------------------------------------------------------------------------
  25. struct LoadInfoArgs
  26. {
  27. OptionalPrincipalInfo requestingPrincipalInfo;
  28. PrincipalInfo triggeringPrincipalInfo;
  29. OptionalPrincipalInfo principalToInheritInfo;
  30. uint32_t securityFlags;
  31. uint32_t contentPolicyType;
  32. uint32_t tainting;
  33. bool upgradeInsecureRequests;
  34. bool verifySignedContent;
  35. bool enforceSRI;
  36. bool forceAllowDataURI;
  37. bool forceInheritPrincipalDropped;
  38. uint64_t innerWindowID;
  39. uint64_t outerWindowID;
  40. uint64_t parentOuterWindowID;
  41. uint64_t frameOuterWindowID;
  42. bool enforceSecurity;
  43. bool initialSecurityCheckDone;
  44. bool isInThirdPartyContext;
  45. NeckoOriginAttributes originAttributes;
  46. PrincipalInfo[] redirectChainIncludingInternalRedirects;
  47. PrincipalInfo[] redirectChain;
  48. nsCString[] corsUnsafeHeaders;
  49. bool forcePreflight;
  50. bool isPreflight;
  51. bool loadTriggeredFromExternal;
  52. bool isFromProcessingFrameAttributes;
  53. };
  54. /**
  55. * Not every channel necessarily has a loadInfo attached.
  56. */
  57. union OptionalLoadInfoArgs
  58. {
  59. void_t;
  60. LoadInfoArgs;
  61. };
  62. //-----------------------------------------------------------------------------
  63. // HTTP IPDL structs
  64. //-----------------------------------------------------------------------------
  65. union OptionalHttpResponseHead
  66. {
  67. void_t;
  68. nsHttpResponseHead;
  69. };
  70. struct CorsPreflightArgs
  71. {
  72. nsCString[] unsafeHeaders;
  73. };
  74. union OptionalCorsPreflightArgs
  75. {
  76. void_t;
  77. CorsPreflightArgs;
  78. };
  79. struct HttpChannelOpenArgs
  80. {
  81. URIParams uri;
  82. // - TODO: bug 571161: unclear if any HTTP channel clients ever
  83. // set originalURI != uri (about:credits?); also not clear if
  84. // chrome channel would ever need to know. Get rid of next arg?
  85. OptionalURIParams original;
  86. OptionalURIParams doc;
  87. OptionalURIParams referrer;
  88. uint32_t referrerPolicy;
  89. OptionalURIParams apiRedirectTo;
  90. OptionalURIParams topWindowURI;
  91. uint32_t loadFlags;
  92. RequestHeaderTuples requestHeaders;
  93. nsCString requestMethod;
  94. OptionalIPCStream uploadStream;
  95. bool uploadStreamHasHeaders;
  96. uint16_t priority;
  97. uint32_t classOfService;
  98. uint8_t redirectionLimit;
  99. bool allowPipelining;
  100. bool allowSTS;
  101. uint32_t thirdPartyFlags;
  102. bool resumeAt;
  103. uint64_t startPos;
  104. nsCString entityID;
  105. bool chooseApplicationCache;
  106. nsCString appCacheClientID;
  107. bool allowSpdy;
  108. bool allowAltSvc;
  109. bool beConservative;
  110. OptionalLoadInfoArgs loadInfo;
  111. OptionalHttpResponseHead synthesizedResponseHead;
  112. nsCString synthesizedSecurityInfoSerialization;
  113. uint32_t cacheKey;
  114. nsCString requestContextID;
  115. OptionalCorsPreflightArgs preflightArgs;
  116. uint32_t initialRwin;
  117. bool blockAuthPrompt;
  118. bool suspendAfterSynthesizeResponse;
  119. bool allowStaleCacheContent;
  120. nsCString contentTypeHint;
  121. nsCString channelId;
  122. uint64_t contentWindowId;
  123. nsCString preferredAlternativeType;
  124. TimeStamp launchServiceWorkerStart;
  125. TimeStamp launchServiceWorkerEnd;
  126. TimeStamp dispatchFetchEventStart;
  127. TimeStamp dispatchFetchEventEnd;
  128. TimeStamp handleFetchEventStart;
  129. TimeStamp handleFetchEventEnd;
  130. };
  131. struct HttpChannelConnectArgs
  132. {
  133. uint32_t registrarId;
  134. bool shouldIntercept;
  135. };
  136. union HttpChannelCreationArgs
  137. {
  138. HttpChannelOpenArgs; // For AsyncOpen: the common case.
  139. HttpChannelConnectArgs; // Used for redirected-to channels
  140. };
  141. //-----------------------------------------------------------------------------
  142. // FTP IPDL structs
  143. //-----------------------------------------------------------------------------
  144. struct FTPChannelOpenArgs
  145. {
  146. URIParams uri;
  147. uint64_t startPos;
  148. nsCString entityID;
  149. OptionalInputStreamParams uploadStream;
  150. OptionalLoadInfoArgs loadInfo;
  151. };
  152. struct FTPChannelConnectArgs
  153. {
  154. uint32_t channelId;
  155. };
  156. union FTPChannelCreationArgs
  157. {
  158. FTPChannelOpenArgs; // For AsyncOpen: the common case.
  159. FTPChannelConnectArgs; // Used for redirected-to channels
  160. };
  161. struct HttpChannelDiverterArgs
  162. {
  163. PHttpChannel mChannel;
  164. bool mApplyConversion;
  165. };
  166. union ChannelDiverterArgs
  167. {
  168. HttpChannelDiverterArgs;
  169. PFTPChannel;
  170. };
  171. //-----------------------------------------------------------------------------
  172. // RTSP IPDL structs
  173. //-----------------------------------------------------------------------------
  174. struct RtspChannelConnectArgs
  175. {
  176. URIParams uri;
  177. uint32_t channelId;
  178. };
  179. } // namespace ipc
  180. } // namespace mozilla