2009-08-18 19:05:15 +00:00
|
|
|
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
|
|
/* vim: set sw=2 ts=8 et tw=80 ft=cpp : */
|
|
|
|
|
2012-05-21 11:12:37 +00:00
|
|
|
/* 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/. */
|
2009-08-18 19:05:15 +00:00
|
|
|
|
2010-07-19 18:33:33 +00:00
|
|
|
include protocol PContent;
|
2010-04-27 07:12:38 +00:00
|
|
|
include protocol PHttpChannel;
|
|
|
|
include protocol PCookieService;
|
2010-07-19 18:33:33 +00:00
|
|
|
include protocol PBrowser;
|
2021-02-10 07:29:38 +00:00
|
|
|
#ifdef MOZ_WIDGET_GTK
|
|
|
|
include protocol PGIOChannel;
|
|
|
|
#endif
|
2011-05-04 13:36:23 +00:00
|
|
|
include protocol PWebSocket;
|
2015-10-28 19:10:20 +00:00
|
|
|
include protocol PWebSocketEventListener;
|
2012-09-24 18:53:49 +00:00
|
|
|
include protocol PTCPSocket;
|
2013-07-29 17:36:43 +00:00
|
|
|
include protocol PTCPServerSocket;
|
2013-05-10 12:00:28 +00:00
|
|
|
include protocol PUDPSocket;
|
2013-12-11 19:03:51 +00:00
|
|
|
include protocol PDNSRequest;
|
2014-03-25 18:37:28 +00:00
|
|
|
include protocol PFileDescriptorSet;
|
2015-03-27 20:12:37 +00:00
|
|
|
include protocol PDataChannel;
|
2017-07-27 20:34:54 +00:00
|
|
|
include protocol PSimpleChannel;
|
2016-06-07 09:46:03 +00:00
|
|
|
include protocol PTransportProvider;
|
2017-03-14 11:29:43 +00:00
|
|
|
include protocol PChildToParentStream; //FIXME: bug #792908
|
|
|
|
include protocol PParentToChildStream; //FIXME: bug #792908
|
2017-03-22 00:59:05 +00:00
|
|
|
include protocol PStunAddrsRequest;
|
2017-04-12 18:43:50 +00:00
|
|
|
include protocol PFileChannel;
|
2019-03-15 18:55:10 +00:00
|
|
|
include protocol PClassifierDummyChannel;
|
2019-09-17 18:15:41 +00:00
|
|
|
include protocol PWebrtcTCPSocket;
|
2019-01-11 20:55:07 +00:00
|
|
|
include protocol PSocketProcessBridge;
|
2019-08-07 05:54:53 +00:00
|
|
|
include protocol PDocumentChannel;
|
2013-06-22 16:09:19 +00:00
|
|
|
|
2017-06-24 00:10:54 +00:00
|
|
|
include IPCStream;
|
2013-06-22 16:09:19 +00:00
|
|
|
include NeckoChannelParams;
|
2016-04-11 03:17:02 +00:00
|
|
|
include protocol PAltDataOutputStream;
|
2012-10-09 23:46:24 +00:00
|
|
|
|
2020-11-23 16:05:33 +00:00
|
|
|
include "mozilla/dom/PermissionMessageUtils.h";
|
|
|
|
|
2020-03-05 21:15:50 +00:00
|
|
|
using mozilla::dom::MaybeDiscardedBrowsingContext from "mozilla/dom/BrowsingContext.h";
|
2013-10-01 19:25:07 +00:00
|
|
|
using class IPC::SerializedLoadContext from "SerializedLoadContext.h";
|
2014-10-24 00:29:00 +00:00
|
|
|
using mozilla::dom::TabId from "mozilla/dom/ipc/IdType.h";
|
2021-02-09 16:50:21 +00:00
|
|
|
[RefCounted] using class nsIInputStream from "mozilla/ipc/IPCStreamUtils.h";
|
|
|
|
[RefCounted] using class nsIURI from "mozilla/ipc/URIUtils.h";
|
|
|
|
[RefCounted] using class nsIPrincipal from "nsIPrincipal.h";
|
2019-04-25 14:18:11 +00:00
|
|
|
|
2012-10-09 23:46:24 +00:00
|
|
|
|
2009-08-18 19:05:15 +00:00
|
|
|
namespace mozilla {
|
|
|
|
namespace net {
|
|
|
|
|
|
|
|
//-------------------------------------------------------------------
|
2016-09-30 23:20:50 +00:00
|
|
|
nested(upto inside_cpow) sync protocol PNecko
|
2009-08-18 19:05:15 +00:00
|
|
|
{
|
2010-07-19 18:33:33 +00:00
|
|
|
manager PContent;
|
2009-08-18 19:05:15 +00:00
|
|
|
manages PHttpChannel;
|
2010-03-25 23:02:28 +00:00
|
|
|
manages PCookieService;
|
2011-05-04 13:36:23 +00:00
|
|
|
manages PWebSocket;
|
2015-10-28 19:10:20 +00:00
|
|
|
manages PWebSocketEventListener;
|
2012-09-24 18:53:49 +00:00
|
|
|
manages PTCPSocket;
|
2013-07-29 17:36:43 +00:00
|
|
|
manages PTCPServerSocket;
|
2013-05-10 12:00:28 +00:00
|
|
|
manages PUDPSocket;
|
2013-12-11 19:03:51 +00:00
|
|
|
manages PDNSRequest;
|
2015-03-27 20:12:37 +00:00
|
|
|
manages PDataChannel;
|
2021-02-10 07:29:38 +00:00
|
|
|
#ifdef MOZ_WIDGET_GTK
|
|
|
|
manages PGIOChannel;
|
|
|
|
#endif
|
2017-07-27 20:34:54 +00:00
|
|
|
manages PSimpleChannel;
|
2017-04-12 18:43:50 +00:00
|
|
|
manages PFileChannel;
|
2016-06-07 09:46:03 +00:00
|
|
|
manages PTransportProvider;
|
2016-04-11 03:17:02 +00:00
|
|
|
manages PAltDataOutputStream;
|
2017-03-22 00:59:05 +00:00
|
|
|
manages PStunAddrsRequest;
|
2019-03-15 18:55:10 +00:00
|
|
|
manages PClassifierDummyChannel;
|
2019-09-17 18:15:41 +00:00
|
|
|
manages PWebrtcTCPSocket;
|
2019-08-07 05:54:53 +00:00
|
|
|
manages PDocumentChannel;
|
2009-08-18 19:05:15 +00:00
|
|
|
|
|
|
|
parent:
|
2016-01-26 21:51:53 +00:00
|
|
|
async __delete__();
|
2009-12-03 08:16:14 +00:00
|
|
|
|
2021-02-09 16:50:22 +00:00
|
|
|
[Nested=inside_cpow] async PCookieService();
|
2020-05-07 22:49:06 +00:00
|
|
|
async PHttpChannel(nullable PBrowser browser,
|
2018-11-28 20:40:35 +00:00
|
|
|
SerializedLoadContext loadContext,
|
|
|
|
HttpChannelCreationArgs args);
|
2013-06-22 16:09:19 +00:00
|
|
|
|
2020-05-07 22:49:06 +00:00
|
|
|
async PWebSocket(nullable PBrowser browser, SerializedLoadContext loadContext,
|
2016-01-26 21:51:53 +00:00
|
|
|
uint32_t aSerialID);
|
|
|
|
async PTCPServerSocket(uint16_t localPort, uint16_t backlog, bool useArrayBuffers);
|
2019-04-25 14:18:11 +00:00
|
|
|
async PUDPSocket(nsIPrincipal principal, nsCString filter);
|
2013-05-10 12:00:28 +00:00
|
|
|
|
2020-02-04 19:35:34 +00:00
|
|
|
async PDNSRequest(nsCString hostName, nsCString trrServer, uint16_t type,
|
|
|
|
OriginAttributes originAttributes, uint32_t flags);
|
2013-12-11 19:03:51 +00:00
|
|
|
|
2020-04-26 00:50:52 +00:00
|
|
|
async PDocumentChannel(MaybeDiscardedBrowsingContext browsingContext,
|
2019-08-07 05:54:53 +00:00
|
|
|
DocumentChannelCreationArgs args);
|
|
|
|
|
2016-01-26 21:51:53 +00:00
|
|
|
async PWebSocketEventListener(uint64_t aInnerWindowID);
|
2015-06-18 09:23:00 +00:00
|
|
|
|
|
|
|
/* Predictor Methods */
|
2020-02-07 10:55:53 +00:00
|
|
|
async PredPredict(nsIURI targetURI, nsIURI sourceURI,
|
2017-02-03 03:16:00 +00:00
|
|
|
uint32_t reason, OriginAttributes originAttributes,
|
2016-01-26 21:51:53 +00:00
|
|
|
bool hasVerifier);
|
2020-02-07 10:55:53 +00:00
|
|
|
async PredLearn(nsIURI targetURI, nsIURI sourceURI,
|
2017-02-03 03:16:00 +00:00
|
|
|
uint32_t reason, OriginAttributes originAttributes);
|
2016-01-26 21:51:53 +00:00
|
|
|
async PredReset();
|
2015-06-18 09:23:00 +00:00
|
|
|
|
2020-03-23 12:54:35 +00:00
|
|
|
async SpeculativeConnect(nsIURI uri, nsIPrincipal principal, bool anonymous);
|
2018-09-22 20:54:11 +00:00
|
|
|
async HTMLDNSPrefetch(nsString hostname, bool isHttps,
|
2020-01-07 19:33:51 +00:00
|
|
|
OriginAttributes originAttributes, uint32_t flags);
|
2018-09-22 20:54:11 +00:00
|
|
|
async CancelHTMLDNSPrefetch(nsString hostname, bool isHttps,
|
|
|
|
OriginAttributes originAttributes,
|
2020-01-07 19:33:51 +00:00
|
|
|
uint32_t flags, nsresult reason);
|
2015-03-27 20:12:37 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* channelId is used to establish a connection between redirect channels in
|
|
|
|
* the parent and the child when we're redirecting to a data: URI.
|
|
|
|
*/
|
2016-01-26 21:51:53 +00:00
|
|
|
async PDataChannel(uint32_t channelId);
|
2021-02-10 07:29:38 +00:00
|
|
|
#ifdef MOZ_WIDGET_GTK
|
|
|
|
async PGIOChannel(nullable PBrowser browser, SerializedLoadContext loadContext, GIOChannelCreationArgs args);
|
|
|
|
#endif
|
2017-07-27 20:34:54 +00:00
|
|
|
async PSimpleChannel(uint32_t channelId);
|
2017-04-12 18:43:50 +00:00
|
|
|
async PFileChannel(uint32_t channelId);
|
|
|
|
|
2019-03-15 18:55:10 +00:00
|
|
|
async PClassifierDummyChannel(nsIURI uri, nsIURI aTopWindowURI,
|
|
|
|
nsresult aTopWindowURIResult,
|
|
|
|
LoadInfoArgs? loadInfo);
|
2018-10-12 09:40:36 +00:00
|
|
|
|
2017-08-30 13:32:00 +00:00
|
|
|
async RequestContextLoadBegin(uint64_t rcid);
|
|
|
|
async RequestContextAfterDOMContentLoaded(uint64_t rcid);
|
2017-03-23 14:40:36 +00:00
|
|
|
async RemoveRequestContext(uint64_t rcid);
|
2015-07-31 20:50:08 +00:00
|
|
|
|
2018-04-25 04:01:00 +00:00
|
|
|
async PAltDataOutputStream(nsCString type, int64_t predictedSize, PHttpChannel channel);
|
2016-04-11 03:17:02 +00:00
|
|
|
|
2017-03-22 00:59:05 +00:00
|
|
|
async PStunAddrsRequest();
|
|
|
|
|
2019-09-17 18:17:37 +00:00
|
|
|
/* tabId is only required for web-proxy support, which isn't always needed */
|
|
|
|
async PWebrtcTCPSocket(TabId? tabId);
|
2018-06-05 17:10:16 +00:00
|
|
|
|
2017-06-24 00:10:54 +00:00
|
|
|
/**
|
|
|
|
* WebExtension-specific remote resource loading
|
|
|
|
*/
|
2020-03-23 12:54:35 +00:00
|
|
|
async GetExtensionStream(nsIURI uri) returns (nsIInputStream stream);
|
|
|
|
async GetExtensionFD(nsIURI uri) returns (FileDescriptor fd);
|
2017-06-24 00:10:54 +00:00
|
|
|
|
2019-01-11 20:55:07 +00:00
|
|
|
async InitSocketProcessBridge()
|
|
|
|
returns (Endpoint<PSocketProcessBridgeChild> endpoint);
|
2021-01-28 16:42:53 +00:00
|
|
|
async ResetSocketProcessBridge();
|
2019-01-11 20:55:07 +00:00
|
|
|
|
2019-03-18 14:50:56 +00:00
|
|
|
async EnsureHSTSData()
|
|
|
|
returns (bool result);
|
|
|
|
|
2020-04-06 17:46:52 +00:00
|
|
|
/**
|
|
|
|
* Page thumbnails remote resource loading
|
|
|
|
*/
|
|
|
|
async GetPageThumbStream(nsIURI uri) returns (nsIInputStream stream);
|
|
|
|
|
2014-06-11 05:44:36 +00:00
|
|
|
child:
|
2015-06-18 09:23:00 +00:00
|
|
|
/* Predictor Methods */
|
2020-02-07 10:55:53 +00:00
|
|
|
async PredOnPredictPrefetch(nsIURI uri, uint32_t httpStatus);
|
|
|
|
async PredOnPredictPreconnect(nsIURI uri);
|
|
|
|
async PredOnPredictDNS(nsIURI uri);
|
2015-06-18 09:23:00 +00:00
|
|
|
|
2016-08-26 06:40:57 +00:00
|
|
|
async SpeculativeConnectRequest();
|
2016-03-28 23:43:01 +00:00
|
|
|
|
2019-12-16 15:01:14 +00:00
|
|
|
// Using medium high priority to deliver this notification possibly sooner than we
|
2018-05-30 14:36:42 +00:00
|
|
|
// enter poll() on the child process with infinite timeout.
|
2021-02-09 16:50:22 +00:00
|
|
|
[Priority=mediumhigh] async NetworkChangeNotification(nsCString type);
|
2018-05-30 14:36:42 +00:00
|
|
|
|
2016-06-07 09:46:03 +00:00
|
|
|
async PTransportProvider();
|
|
|
|
|
2013-07-29 17:36:43 +00:00
|
|
|
both:
|
2013-12-19 03:21:12 +00:00
|
|
|
// Actually we need PTCPSocket() for parent. But ipdl disallows us having different
|
2017-03-14 11:29:43 +00:00
|
|
|
// signatures on parent and child. So when constructing the parent side object, we just
|
2013-12-19 03:21:12 +00:00
|
|
|
// leave host/port unused.
|
2016-01-26 21:51:53 +00:00
|
|
|
async PTCPSocket(nsString host, uint16_t port);
|
2009-08-18 19:05:15 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
} // namespace net
|
|
|
|
} // namespace mozilla
|