2013-06-22 20:09:19 +04:00
|
|
|
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
|
|
/* vim: set sw=2 ts=8 et tw=80 ft=c: */
|
|
|
|
|
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
|
|
2014-03-11 02:04:28 +04:00
|
|
|
include protocol PHttpChannel;
|
|
|
|
include protocol PFTPChannel;
|
2014-04-03 15:08:34 +04:00
|
|
|
include protocol PRtspChannel;
|
2017-03-14 14:28:58 +03:00
|
|
|
include protocol PChildToParentStream;
|
2016-05-18 01:01:25 +03:00
|
|
|
include BlobTypes;
|
2013-06-22 20:09:19 +04:00
|
|
|
include URIParams;
|
2016-09-29 01:38:26 +03:00
|
|
|
include IPCStream;
|
2014-09-21 20:40:27 +04:00
|
|
|
include PBackgroundSharedTypes;
|
2013-06-22 20:09:19 +04:00
|
|
|
|
2017-01-12 19:38:48 +03:00
|
|
|
using mozilla::OriginAttributes from "mozilla/ipc/BackgroundUtils.h";
|
2013-10-01 23:25:07 +04:00
|
|
|
using struct mozilla::void_t from "ipc/IPCMessageUtils.h";
|
|
|
|
using RequestHeaderTuples from "mozilla/net/PHttpChannelParams.h";
|
|
|
|
using struct nsHttpAtom from "nsHttp.h";
|
2015-04-18 01:59:10 +03:00
|
|
|
using class nsHttpResponseHead from "nsHttpResponseHead.h";
|
2017-04-10 16:13:21 +03:00
|
|
|
using class mozilla::TimeStamp from "mozilla/TimeStamp.h";
|
2013-06-22 20:09:19 +04:00
|
|
|
|
|
|
|
namespace mozilla {
|
|
|
|
namespace net {
|
|
|
|
|
2015-06-19 01:37:20 +03:00
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
// LoadInfo IPDL structs
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
|
2017-05-25 20:42:00 +03:00
|
|
|
struct RedirectHistoryEntryInfo
|
|
|
|
{
|
|
|
|
PrincipalInfo principalInfo;
|
|
|
|
OptionalURIParams referrerUri;
|
|
|
|
nsCString remoteAddress;
|
|
|
|
};
|
|
|
|
|
2015-06-19 01:37:20 +03:00
|
|
|
struct LoadInfoArgs
|
|
|
|
{
|
2017-05-25 20:42:00 +03:00
|
|
|
OptionalPrincipalInfo requestingPrincipalInfo;
|
|
|
|
PrincipalInfo triggeringPrincipalInfo;
|
|
|
|
OptionalPrincipalInfo principalToInheritInfo;
|
|
|
|
OptionalPrincipalInfo sandboxedLoadingPrincipalInfo;
|
2017-05-30 19:07:59 +03:00
|
|
|
OptionalURIParams resultPrincipalURI;
|
2017-05-25 20:42:00 +03:00
|
|
|
uint32_t securityFlags;
|
|
|
|
uint32_t contentPolicyType;
|
|
|
|
uint32_t tainting;
|
|
|
|
bool upgradeInsecureRequests;
|
|
|
|
bool verifySignedContent;
|
|
|
|
bool enforceSRI;
|
|
|
|
bool forceInheritPrincipalDropped;
|
|
|
|
uint64_t innerWindowID;
|
|
|
|
uint64_t outerWindowID;
|
|
|
|
uint64_t parentOuterWindowID;
|
|
|
|
uint64_t frameOuterWindowID;
|
|
|
|
bool enforceSecurity;
|
|
|
|
bool initialSecurityCheckDone;
|
|
|
|
bool isInThirdPartyContext;
|
|
|
|
OriginAttributes originAttributes;
|
|
|
|
RedirectHistoryEntryInfo[] redirectChainIncludingInternalRedirects;
|
|
|
|
RedirectHistoryEntryInfo[] redirectChain;
|
|
|
|
nsCString[] corsUnsafeHeaders;
|
|
|
|
bool forcePreflight;
|
|
|
|
bool isPreflight;
|
|
|
|
bool forceHSTSPriming;
|
|
|
|
bool mixedContentWouldBlock;
|
2017-05-10 01:36:07 +03:00
|
|
|
bool isHSTSPriming;
|
|
|
|
bool isHSTSPrimingUpgrade;
|
2015-06-19 01:37:20 +03:00
|
|
|
};
|
|
|
|
|
2015-07-14 08:43:13 +03:00
|
|
|
/**
|
|
|
|
* Not every channel necessarily has a loadInfo attached.
|
|
|
|
*/
|
|
|
|
union OptionalLoadInfoArgs
|
|
|
|
{
|
|
|
|
void_t;
|
|
|
|
LoadInfoArgs;
|
|
|
|
};
|
|
|
|
|
2013-06-22 20:09:19 +04:00
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
// HTTP IPDL structs
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
|
2015-04-18 01:59:10 +03:00
|
|
|
union OptionalHttpResponseHead
|
|
|
|
{
|
|
|
|
void_t;
|
|
|
|
nsHttpResponseHead;
|
|
|
|
};
|
|
|
|
|
2015-08-31 23:36:22 +03:00
|
|
|
struct CorsPreflightArgs
|
|
|
|
{
|
|
|
|
nsCString[] unsafeHeaders;
|
|
|
|
};
|
|
|
|
|
|
|
|
union OptionalCorsPreflightArgs
|
|
|
|
{
|
|
|
|
void_t;
|
|
|
|
CorsPreflightArgs;
|
|
|
|
};
|
|
|
|
|
2013-06-22 20:09:19 +04:00
|
|
|
struct HttpChannelOpenArgs
|
|
|
|
{
|
|
|
|
URIParams uri;
|
|
|
|
// - TODO: bug 571161: unclear if any HTTP channel clients ever
|
|
|
|
// set originalURI != uri (about:credits?); also not clear if
|
|
|
|
// chrome channel would ever need to know. Get rid of next arg?
|
|
|
|
OptionalURIParams original;
|
|
|
|
OptionalURIParams doc;
|
|
|
|
OptionalURIParams referrer;
|
2014-11-18 16:46:35 +03:00
|
|
|
uint32_t referrerPolicy;
|
2013-06-22 20:09:19 +04:00
|
|
|
OptionalURIParams apiRedirectTo;
|
2014-10-30 03:22:22 +03:00
|
|
|
OptionalURIParams topWindowURI;
|
2013-06-22 20:09:19 +04:00
|
|
|
uint32_t loadFlags;
|
|
|
|
RequestHeaderTuples requestHeaders;
|
2014-03-18 20:36:18 +04:00
|
|
|
nsCString requestMethod;
|
2016-09-29 01:38:26 +03:00
|
|
|
OptionalIPCStream uploadStream;
|
2013-06-22 20:09:19 +04:00
|
|
|
bool uploadStreamHasHeaders;
|
2017-02-09 12:28:54 +03:00
|
|
|
int16_t priority;
|
2014-12-06 22:26:50 +03:00
|
|
|
uint32_t classOfService;
|
2013-06-22 20:09:19 +04:00
|
|
|
uint8_t redirectionLimit;
|
2014-06-04 20:57:15 +04:00
|
|
|
bool allowSTS;
|
2014-10-28 16:23:00 +03:00
|
|
|
uint32_t thirdPartyFlags;
|
2013-06-22 20:09:19 +04:00
|
|
|
bool resumeAt;
|
|
|
|
uint64_t startPos;
|
|
|
|
nsCString entityID;
|
|
|
|
bool chooseApplicationCache;
|
|
|
|
nsCString appCacheClientID;
|
|
|
|
bool allowSpdy;
|
2015-04-13 19:59:34 +03:00
|
|
|
bool allowAltSvc;
|
2016-12-03 00:49:23 +03:00
|
|
|
bool beConservative;
|
2015-07-14 08:43:13 +03:00
|
|
|
OptionalLoadInfoArgs loadInfo;
|
2015-04-18 01:59:10 +03:00
|
|
|
OptionalHttpResponseHead synthesizedResponseHead;
|
2015-08-20 00:50:34 +03:00
|
|
|
nsCString synthesizedSecurityInfoSerialization;
|
2015-05-14 20:05:34 +03:00
|
|
|
uint32_t cacheKey;
|
2017-03-23 17:40:36 +03:00
|
|
|
uint64_t requestContextID;
|
2015-08-31 23:36:22 +03:00
|
|
|
OptionalCorsPreflightArgs preflightArgs;
|
2015-09-11 22:53:27 +03:00
|
|
|
uint32_t initialRwin;
|
2015-12-30 21:47:55 +03:00
|
|
|
bool blockAuthPrompt;
|
2015-12-23 23:20:53 +03:00
|
|
|
bool suspendAfterSynthesizeResponse;
|
2016-01-19 17:28:00 +03:00
|
|
|
bool allowStaleCacheContent;
|
2016-03-16 09:03:57 +03:00
|
|
|
nsCString contentTypeHint;
|
2017-03-24 00:01:21 +03:00
|
|
|
uint64_t channelId;
|
2016-12-16 05:42:00 +03:00
|
|
|
uint64_t contentWindowId;
|
2016-04-11 06:17:02 +03:00
|
|
|
nsCString preferredAlternativeType;
|
2017-03-09 10:55:00 +03:00
|
|
|
uint64_t topLevelOuterContentWindowId;
|
2017-04-10 16:13:21 +03:00
|
|
|
TimeStamp launchServiceWorkerStart;
|
|
|
|
TimeStamp launchServiceWorkerEnd;
|
|
|
|
TimeStamp dispatchFetchEventStart;
|
|
|
|
TimeStamp dispatchFetchEventEnd;
|
|
|
|
TimeStamp handleFetchEventStart;
|
|
|
|
TimeStamp handleFetchEventEnd;
|
2013-06-22 20:09:19 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
struct HttpChannelConnectArgs
|
|
|
|
{
|
2016-06-01 22:29:21 +03:00
|
|
|
uint32_t registrarId;
|
2015-05-28 17:47:35 +03:00
|
|
|
bool shouldIntercept;
|
2013-06-22 20:09:19 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
union HttpChannelCreationArgs
|
|
|
|
{
|
|
|
|
HttpChannelOpenArgs; // For AsyncOpen: the common case.
|
|
|
|
HttpChannelConnectArgs; // Used for redirected-to channels
|
|
|
|
};
|
|
|
|
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
// FTP IPDL structs
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
struct FTPChannelOpenArgs
|
|
|
|
{
|
2014-09-21 20:40:27 +04:00
|
|
|
URIParams uri;
|
|
|
|
uint64_t startPos;
|
|
|
|
nsCString entityID;
|
2017-03-09 16:09:31 +03:00
|
|
|
OptionalIPCStream uploadStream;
|
2015-07-14 08:43:13 +03:00
|
|
|
OptionalLoadInfoArgs loadInfo;
|
2013-06-22 20:09:19 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
struct FTPChannelConnectArgs
|
|
|
|
{
|
|
|
|
uint32_t channelId;
|
|
|
|
};
|
|
|
|
|
|
|
|
union FTPChannelCreationArgs
|
|
|
|
{
|
|
|
|
FTPChannelOpenArgs; // For AsyncOpen: the common case.
|
|
|
|
FTPChannelConnectArgs; // Used for redirected-to channels
|
|
|
|
};
|
|
|
|
|
2014-10-22 03:40:08 +04:00
|
|
|
struct HttpChannelDiverterArgs
|
|
|
|
{
|
|
|
|
PHttpChannel mChannel;
|
|
|
|
bool mApplyConversion;
|
|
|
|
};
|
|
|
|
|
2014-03-11 02:04:28 +04:00
|
|
|
union ChannelDiverterArgs
|
|
|
|
{
|
2014-10-22 03:40:08 +04:00
|
|
|
HttpChannelDiverterArgs;
|
2014-03-11 02:04:28 +04:00
|
|
|
PFTPChannel;
|
|
|
|
};
|
|
|
|
|
2014-04-03 15:08:34 +04:00
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
// RTSP IPDL structs
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
struct RtspChannelConnectArgs
|
|
|
|
{
|
|
|
|
URIParams uri;
|
|
|
|
uint32_t channelId;
|
|
|
|
};
|
|
|
|
|
2013-06-22 20:09:19 +04:00
|
|
|
} // namespace ipc
|
|
|
|
} // namespace mozilla
|