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;
|
2010-08-10 18:47:00 +00:00
|
|
|
include protocol PFTPChannel;
|
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-10 22:04:28 +00:00
|
|
|
include protocol PChannelDiverter;
|
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;
|
2018-06-05 17:10:16 +00:00
|
|
|
include protocol PWebrtcProxyChannel;
|
2019-01-11 20:55:07 +00:00
|
|
|
include protocol PSocketProcessBridge;
|
2013-06-22 16:09:19 +00:00
|
|
|
|
2017-06-24 00:10:54 +00:00
|
|
|
include IPCStream;
|
2012-12-22 13:56:21 +00:00
|
|
|
include URIParams;
|
2013-06-22 16:09:19 +00:00
|
|
|
include NeckoChannelParams;
|
2014-10-29 18:11:00 +00:00
|
|
|
include PBrowserOrId;
|
2016-04-11 03:17:02 +00:00
|
|
|
include protocol PAltDataOutputStream;
|
2012-10-09 23:46:24 +00:00
|
|
|
|
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";
|
2015-04-08 19:35:00 +00:00
|
|
|
using class IPC::Principal from "mozilla/dom/PermissionMessageUtils.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-07 01:14:59 +00: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";
|
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;
|
2010-08-10 18:47:00 +00:00
|
|
|
manages PFTPChannel;
|
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;
|
2017-07-27 20:34:54 +00:00
|
|
|
manages PSimpleChannel;
|
2017-04-12 18:43:50 +00:00
|
|
|
manages PFileChannel;
|
2014-03-10 22:04:28 +00:00
|
|
|
manages PChannelDiverter;
|
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;
|
2018-06-05 17:10:16 +00:00
|
|
|
manages PWebrtcProxyChannel;
|
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
|
|
|
|
2016-09-30 23:20:50 +00:00
|
|
|
nested(inside_cpow) async PCookieService();
|
2018-11-28 20:40:35 +00:00
|
|
|
async PHttpChannel(PBrowserOrId browser,
|
|
|
|
SerializedLoadContext loadContext,
|
|
|
|
HttpChannelCreationArgs args);
|
2016-01-26 21:51:53 +00:00
|
|
|
async PFTPChannel(PBrowserOrId browser, SerializedLoadContext loadContext,
|
|
|
|
FTPChannelCreationArgs args);
|
2013-06-22 16:09:19 +00:00
|
|
|
|
2016-01-26 21:51:53 +00:00
|
|
|
async PWebSocket(PBrowserOrId browser, SerializedLoadContext loadContext,
|
|
|
|
uint32_t aSerialID);
|
|
|
|
async PTCPServerSocket(uint16_t localPort, uint16_t backlog, bool useArrayBuffers);
|
|
|
|
async PUDPSocket(Principal principal, nsCString filter);
|
2013-05-10 12:00:28 +00:00
|
|
|
|
2017-02-15 03:53:37 +00:00
|
|
|
async PDNSRequest(nsCString hostName, OriginAttributes originAttributes,
|
2018-05-16 20:05:03 +00:00
|
|
|
uint32_t flags);
|
2013-12-11 19:03:51 +00:00
|
|
|
|
2016-01-26 21:51:53 +00:00
|
|
|
async PWebSocketEventListener(uint64_t aInnerWindowID);
|
2015-06-18 09:23:00 +00:00
|
|
|
|
|
|
|
/* Predictor Methods */
|
2019-03-06 14:05:50 +00:00
|
|
|
async PredPredict(URIParams? targetURI, URIParams? sourceURI,
|
2017-02-03 03:16:00 +00:00
|
|
|
uint32_t reason, OriginAttributes originAttributes,
|
2016-01-26 21:51:53 +00:00
|
|
|
bool hasVerifier);
|
2019-03-06 14:05:50 +00:00
|
|
|
async PredLearn(URIParams targetURI, URIParams? 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
|
|
|
|
2016-10-24 04:18:25 +00:00
|
|
|
async SpeculativeConnect(URIParams uri, Principal principal, bool anonymous);
|
2018-09-22 20:54:11 +00:00
|
|
|
async HTMLDNSPrefetch(nsString hostname, bool isHttps,
|
|
|
|
OriginAttributes originAttributes, uint16_t flags);
|
|
|
|
async CancelHTMLDNSPrefetch(nsString hostname, bool isHttps,
|
|
|
|
OriginAttributes originAttributes,
|
2017-02-15 03:53:37 +00:00
|
|
|
uint16_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);
|
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);
|
|
|
|
|
2016-01-26 21:51:53 +00:00
|
|
|
async PChannelDiverter(ChannelDiverterArgs channel);
|
2010-08-11 03:11:57 +00:00
|
|
|
|
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
|
|
|
|
2014-06-11 05:44:36 +00: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 21:51:53 +00:00
|
|
|
async OnAuthAvailable(uint64_t callbackId, nsString user,
|
|
|
|
nsString password, nsString domain);
|
|
|
|
async OnAuthCancelled(uint64_t callbackId, bool userCancel);
|
2014-06-11 05:44: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();
|
|
|
|
|
2018-06-05 17:10:16 +00:00
|
|
|
async PWebrtcProxyChannel(PBrowserOrId browser);
|
|
|
|
|
2017-06-24 00:10:54 +00:00
|
|
|
/**
|
|
|
|
* WebExtension-specific remote resource loading
|
|
|
|
*/
|
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-07 01:14:59 +00:00
|
|
|
async GetExtensionStream(URIParams uri) returns (nsIInputStream stream);
|
2017-07-20 18:49:29 +00:00
|
|
|
async GetExtensionFD(URIParams 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);
|
|
|
|
|
2019-03-18 14:50:56 +00:00
|
|
|
async EnsureHSTSData()
|
|
|
|
returns (bool result);
|
|
|
|
|
2014-06-11 05:44:36 +00: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 21:51:53 +00:00
|
|
|
async AsyncAuthPromptForNestedFrame(TabId nestedFrameId, nsCString uri,
|
|
|
|
nsString realm, uint64_t callbackId);
|
2014-06-11 05:44:36 +00:00
|
|
|
|
2015-06-18 09:23:00 +00:00
|
|
|
/* Predictor Methods */
|
2016-04-15 02:26:58 +00:00
|
|
|
async PredOnPredictPrefetch(URIParams uri, uint32_t httpStatus);
|
2016-01-26 21:51:53 +00:00
|
|
|
async PredOnPredictPreconnect(URIParams uri);
|
|
|
|
async PredOnPredictDNS(URIParams 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
|
|
|
|
2018-05-30 14:36:42 +00:00
|
|
|
// Using high priority to deliver this notification possibly sooner than we
|
|
|
|
// enter poll() on the child process with infinite timeout.
|
|
|
|
prio(high) async NetworkChangeNotification(nsCString type);
|
|
|
|
|
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
|