2009-08-18 12:05:15 -07: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 12:12:37 +01: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 12:05:15 -07:00
|
|
|
|
2010-07-19 13:33:33 -05:00
|
|
|
include protocol PContent;
|
2010-04-27 02:12:38 -05:00
|
|
|
include protocol PHttpChannel;
|
|
|
|
include protocol PCookieService;
|
2010-07-19 13:33:33 -05:00
|
|
|
include protocol PBrowser;
|
2010-08-10 14:47:00 -04:00
|
|
|
include protocol PFTPChannel;
|
2011-05-04 15:36:23 +02:00
|
|
|
include protocol PWebSocket;
|
2015-10-28 19:10:20 +00:00
|
|
|
include protocol PWebSocketEventListener;
|
2012-09-24 14:53:49 -04:00
|
|
|
include protocol PTCPSocket;
|
2013-07-29 10:36:43 -07:00
|
|
|
include protocol PTCPServerSocket;
|
2013-05-10 20:00:28 +08:00
|
|
|
include protocol PUDPSocket;
|
2013-12-11 11:03:51 -08:00
|
|
|
include protocol PDNSRequest;
|
2014-03-10 23:04:28 +01:00
|
|
|
include protocol PChannelDiverter;
|
2014-03-25 18:37:28 +00:00
|
|
|
include protocol PFileDescriptorSet;
|
2015-03-27 13:12:37 -07:00
|
|
|
include protocol PDataChannel;
|
2017-07-27 13:34:54 -07:00
|
|
|
include protocol PSimpleChannel;
|
2016-06-07 02:46:03 -07:00
|
|
|
include protocol PTransportProvider;
|
2017-03-14 12:29:43 +01:00
|
|
|
include protocol PChildToParentStream; //FIXME: bug #792908
|
|
|
|
include protocol PParentToChildStream; //FIXME: bug #792908
|
2017-03-21 19:59:05 -05:00
|
|
|
include protocol PStunAddrsRequest;
|
2017-04-12 11:43:50 -07: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 15:54:53 +10:00
|
|
|
include protocol PDocumentChannel;
|
2013-06-22 09:09:19 -07:00
|
|
|
|
2017-06-23 17:10:54 -07:00
|
|
|
include IPCStream;
|
2013-06-22 09:09:19 -07:00
|
|
|
include NeckoChannelParams;
|
2014-10-29 19:11:00 +01:00
|
|
|
include PBrowserOrId;
|
2016-04-11 05:17:02 +02:00
|
|
|
include protocol PAltDataOutputStream;
|
2012-10-09 16:46:24 -07:00
|
|
|
|
2020-03-05 21:15:50 +00:00
|
|
|
using mozilla::dom::MaybeDiscardedBrowsingContext from "mozilla/dom/BrowsingContext.h";
|
2013-10-01 15:25:07 -04:00
|
|
|
using class IPC::SerializedLoadContext from "SerializedLoadContext.h";
|
2014-10-24 02:29:00 +02:00
|
|
|
using mozilla::dom::TabId from "mozilla/dom/ipc/IdType.h";
|
Bug 1443954 - Part 3: Add support for RefCounted types to IPDL, r=bz,froydnj,baku
This patch was reviewed in parts, however the intermediate states would not build:
Bug 1443954 - Part 3A: Strip pointers from the argument to WriteParam and WriteIPDLParam before selecting the ParamTraits impl, r=froydnj
Bug 1443954 - Part 3B: Move nsIAlertNotification serialization to the refcounted system, r=bz
Bug 1443954 - Part 3C: Move geolocation serialization to the refcounted system, r=bz
Bug 1443954 - Part 3D: Move nsIInputStream serialization to the refcounted system, r=baku
Bug 1443954 - Part 3E: Move BlobImpl serialization to the refcounted system, r=baku
Bug 1443954 - Part 3F: Correctly implement ParamTraits for actors after the ParamTraits changes, r=froydnj
2018-03-06 20:14:59 -05:00
|
|
|
using refcounted class nsIInputStream from "mozilla/ipc/IPCStreamUtils.h";
|
2018-09-04 20:45:22 +00:00
|
|
|
using refcounted class nsIURI from "mozilla/ipc/URIUtils.h";
|
2019-04-25 14:18:11 +00:00
|
|
|
using refcounted class nsIPrincipal from "mozilla/dom/PermissionMessageUtils.h";
|
|
|
|
|
2012-10-09 16:46:24 -07:00
|
|
|
|
2009-08-18 12:05:15 -07:00
|
|
|
namespace mozilla {
|
|
|
|
namespace net {
|
|
|
|
|
|
|
|
//-------------------------------------------------------------------
|
2016-09-30 16:20:50 -07:00
|
|
|
nested(upto inside_cpow) sync protocol PNecko
|
2009-08-18 12:05:15 -07:00
|
|
|
{
|
2010-07-19 13:33:33 -05:00
|
|
|
manager PContent;
|
2009-08-18 12:05:15 -07:00
|
|
|
manages PHttpChannel;
|
2010-03-25 16:02:28 -07:00
|
|
|
manages PCookieService;
|
2010-08-10 14:47:00 -04:00
|
|
|
manages PFTPChannel;
|
2011-05-04 15:36:23 +02:00
|
|
|
manages PWebSocket;
|
2015-10-28 19:10:20 +00:00
|
|
|
manages PWebSocketEventListener;
|
2012-09-24 14:53:49 -04:00
|
|
|
manages PTCPSocket;
|
2013-07-29 10:36:43 -07:00
|
|
|
manages PTCPServerSocket;
|
2013-05-10 20:00:28 +08:00
|
|
|
manages PUDPSocket;
|
2013-12-11 11:03:51 -08:00
|
|
|
manages PDNSRequest;
|
2015-03-27 13:12:37 -07:00
|
|
|
manages PDataChannel;
|
2017-07-27 13:34:54 -07:00
|
|
|
manages PSimpleChannel;
|
2017-04-12 11:43:50 -07:00
|
|
|
manages PFileChannel;
|
2014-03-10 23:04:28 +01:00
|
|
|
manages PChannelDiverter;
|
2016-06-07 02:46:03 -07:00
|
|
|
manages PTransportProvider;
|
2016-04-11 05:17:02 +02:00
|
|
|
manages PAltDataOutputStream;
|
2017-03-21 19:59:05 -05: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 15:54:53 +10:00
|
|
|
manages PDocumentChannel;
|
2009-08-18 12:05:15 -07:00
|
|
|
|
|
|
|
parent:
|
2016-01-26 13:51:53 -08:00
|
|
|
async __delete__();
|
2009-12-03 02:16:14 -06:00
|
|
|
|
2016-09-30 16:20:50 -07:00
|
|
|
nested(inside_cpow) async PCookieService();
|
2018-11-28 21:40:35 +01:00
|
|
|
async PHttpChannel(PBrowserOrId browser,
|
|
|
|
SerializedLoadContext loadContext,
|
|
|
|
HttpChannelCreationArgs args);
|
2016-01-26 13:51:53 -08:00
|
|
|
async PFTPChannel(PBrowserOrId browser, SerializedLoadContext loadContext,
|
|
|
|
FTPChannelCreationArgs args);
|
2013-06-22 09:09:19 -07:00
|
|
|
|
2016-01-26 13:51:53 -08:00
|
|
|
async PWebSocket(PBrowserOrId browser, SerializedLoadContext loadContext,
|
|
|
|
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 20:00:28 +08: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 11:03:51 -08:00
|
|
|
|
2019-12-17 03:54:45 +00:00
|
|
|
async PDocumentChannel(PBrowser browser,
|
2020-03-05 21:15:50 +00:00
|
|
|
MaybeDiscardedBrowsingContext browsingContext,
|
2019-08-07 15:54:53 +10:00
|
|
|
SerializedLoadContext loadContext,
|
|
|
|
DocumentChannelCreationArgs args);
|
|
|
|
|
2016-01-26 13:51:53 -08:00
|
|
|
async PWebSocketEventListener(uint64_t aInnerWindowID);
|
2015-06-18 11:23:00 +02:00
|
|
|
|
|
|
|
/* Predictor Methods */
|
2020-02-07 10:55:53 +00:00
|
|
|
async PredPredict(nsIURI targetURI, nsIURI sourceURI,
|
2017-02-02 22:16:00 -05:00
|
|
|
uint32_t reason, OriginAttributes originAttributes,
|
2016-01-26 13:51:53 -08:00
|
|
|
bool hasVerifier);
|
2020-02-07 10:55:53 +00:00
|
|
|
async PredLearn(nsIURI targetURI, nsIURI sourceURI,
|
2017-02-02 22:16:00 -05:00
|
|
|
uint32_t reason, OriginAttributes originAttributes);
|
2016-01-26 13:51:53 -08:00
|
|
|
async PredReset();
|
2015-06-18 11:23:00 +02:00
|
|
|
|
2020-03-23 12:54:35 +00:00
|
|
|
async SpeculativeConnect(nsIURI uri, nsIPrincipal principal, bool anonymous);
|
2018-09-22 23:54:11 +03:00
|
|
|
async HTMLDNSPrefetch(nsString hostname, bool isHttps,
|
2020-01-07 19:33:51 +00:00
|
|
|
OriginAttributes originAttributes, uint32_t flags);
|
2018-09-22 23:54:11 +03: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 13:12:37 -07: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 13:51:53 -08:00
|
|
|
async PDataChannel(uint32_t channelId);
|
2017-07-27 13:34:54 -07:00
|
|
|
async PSimpleChannel(uint32_t channelId);
|
2017-04-12 11:43:50 -07:00
|
|
|
async PFileChannel(uint32_t channelId);
|
|
|
|
|
2016-01-26 13:51:53 -08:00
|
|
|
async PChannelDiverter(ChannelDiverterArgs channel);
|
2010-08-10 20:11:57 -07:00
|
|
|
|
2019-03-15 18:55:10 +00:00
|
|
|
async PClassifierDummyChannel(nsIURI uri, nsIURI aTopWindowURI,
|
|
|
|
nsresult aTopWindowURIResult,
|
|
|
|
LoadInfoArgs? loadInfo);
|
2018-10-12 11:40:36 +02:00
|
|
|
|
2014-06-11 13:44:36 +08:00
|
|
|
/**
|
|
|
|
* These are called from the child with the results of the auth prompt.
|
|
|
|
* callbackId is the id that was passed in PBrowser::AsyncAuthPrompt,
|
|
|
|
* corresponding to an nsIAuthPromptCallback
|
|
|
|
*/
|
2016-01-26 13:51:53 -08:00
|
|
|
async OnAuthAvailable(uint64_t callbackId, nsString user,
|
|
|
|
nsString password, nsString domain);
|
|
|
|
async OnAuthCancelled(uint64_t callbackId, bool userCancel);
|
2014-06-11 13:44:36 +08:00
|
|
|
|
2017-08-30 09:32:00 -04:00
|
|
|
async RequestContextLoadBegin(uint64_t rcid);
|
|
|
|
async RequestContextAfterDOMContentLoaded(uint64_t rcid);
|
2017-03-23 07:40:36 -07:00
|
|
|
async RemoveRequestContext(uint64_t rcid);
|
2015-07-31 13:50:08 -07:00
|
|
|
|
2018-04-25 07:01:00 +03:00
|
|
|
async PAltDataOutputStream(nsCString type, int64_t predictedSize, PHttpChannel channel);
|
2016-04-11 05:17:02 +02:00
|
|
|
|
2017-03-21 19:59:05 -05: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 12:10:16 -05:00
|
|
|
|
2017-06-23 17:10:54 -07: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-23 17:10:54 -07:00
|
|
|
|
2019-01-11 20:55:07 +00:00
|
|
|
async InitSocketProcessBridge()
|
|
|
|
returns (Endpoint<PSocketProcessBridgeChild> endpoint);
|
|
|
|
|
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 13:44:36 +08:00
|
|
|
child:
|
|
|
|
/*
|
|
|
|
* Bring up the http auth prompt for a nested remote mozbrowser.
|
|
|
|
* NestedFrameId is the id corresponding to the PBrowser. It is the same id
|
|
|
|
* that was passed to the PBrowserOrId param in to the PHttpChannel constructor
|
|
|
|
*/
|
2016-01-26 13:51:53 -08:00
|
|
|
async AsyncAuthPromptForNestedFrame(TabId nestedFrameId, nsCString uri,
|
|
|
|
nsString realm, uint64_t callbackId);
|
2014-06-11 13:44:36 +08:00
|
|
|
|
2015-06-18 11:23:00 +02: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 11:23:00 +02:00
|
|
|
|
2016-08-26 16:40:57 +10:00
|
|
|
async SpeculativeConnectRequest();
|
2016-03-28 16:43:01 -07:00
|
|
|
|
2019-12-16 15:01:14 +00:00
|
|
|
// Using medium high priority to deliver this notification possibly sooner than we
|
2018-05-30 17:36:42 +03:00
|
|
|
// enter poll() on the child process with infinite timeout.
|
2019-12-16 15:01:14 +00:00
|
|
|
prio(mediumhigh) async NetworkChangeNotification(nsCString type);
|
2018-05-30 17:36:42 +03:00
|
|
|
|
2016-06-07 02:46:03 -07:00
|
|
|
async PTransportProvider();
|
|
|
|
|
2013-07-29 10:36:43 -07:00
|
|
|
both:
|
2013-12-19 11:21:12 +08:00
|
|
|
// Actually we need PTCPSocket() for parent. But ipdl disallows us having different
|
2017-03-14 12:29:43 +01:00
|
|
|
// signatures on parent and child. So when constructing the parent side object, we just
|
2013-12-19 11:21:12 +08:00
|
|
|
// leave host/port unused.
|
2016-01-26 13:51:53 -08:00
|
|
|
async PTCPSocket(nsString host, uint16_t port);
|
2009-08-18 12:05:15 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
} // namespace net
|
|
|
|
} // namespace mozilla
|