1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim: set sw=2 ts=8 et tw=80 ft=cpp : */
4 /* This Source Code Form is subject to the terms of the Mozilla Public
5 * License, v. 2.0. If a copy of the MPL was not distributed with this
6 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
8 include protocol PContent;
9 include protocol PHttpChannel;
10 include protocol PCookieService;
11 include protocol PBrowser;
12 include protocol PFTPChannel;
14 include protocol PGIOChannel;
16 include protocol PWebSocket;
17 include protocol PWebSocketEventListener;
18 include protocol PTCPSocket;
19 include protocol PTCPServerSocket;
20 include protocol PUDPSocket;
21 include protocol PDNSRequest;
22 include protocol PFileDescriptorSet;
23 include protocol PDataChannel;
24 include protocol PSimpleChannel;
25 include protocol PTransportProvider;
26 include protocol PChildToParentStream; //FIXME: bug #792908
27 include protocol PParentToChildStream; //FIXME: bug #792908
28 include protocol PStunAddrsRequest;
29 include protocol PFileChannel;
30 include protocol PClassifierDummyChannel;
31 include protocol PWebrtcTCPSocket;
32 include protocol PSocketProcessBridge;
33 include protocol PDocumentChannel;
36 include NeckoChannelParams;
37 include protocol PAltDataOutputStream;
39 include "mozilla/dom/PermissionMessageUtils.h";
41 using mozilla::dom::MaybeDiscardedBrowsingContext from "mozilla/dom/BrowsingContext.h";
42 using class IPC::SerializedLoadContext from "SerializedLoadContext.h";
43 using mozilla::dom::TabId from "mozilla/dom/ipc/IdType.h";
44 [RefCounted] using class nsIInputStream from "mozilla/ipc/IPCStreamUtils.h";
45 [RefCounted] using class nsIURI from "mozilla/ipc/URIUtils.h";
46 [RefCounted] using class nsIPrincipal from "nsIPrincipal.h";
52 //-------------------------------------------------------------------
53 nested(upto inside_cpow) sync protocol PNecko
57 manages PCookieService;
60 manages PWebSocketEventListener;
62 manages PTCPServerSocket;
69 manages PSimpleChannel;
71 manages PTransportProvider;
72 manages PAltDataOutputStream;
73 manages PStunAddrsRequest;
74 manages PClassifierDummyChannel;
75 manages PWebrtcTCPSocket;
76 manages PDocumentChannel;
81 [Nested=inside_cpow] async PCookieService();
82 async PHttpChannel(nullable PBrowser browser,
83 SerializedLoadContext loadContext,
84 HttpChannelCreationArgs args);
85 async PFTPChannel(nullable PBrowser browser, SerializedLoadContext loadContext,
86 FTPChannelCreationArgs args);
88 async PWebSocket(nullable PBrowser browser, SerializedLoadContext loadContext,
90 async PTCPServerSocket(uint16_t localPort, uint16_t backlog, bool useArrayBuffers);
91 async PUDPSocket(nsIPrincipal principal, nsCString filter);
93 async PDNSRequest(nsCString hostName, nsCString trrServer, uint16_t type,
94 OriginAttributes originAttributes, uint32_t flags);
96 async PDocumentChannel(MaybeDiscardedBrowsingContext browsingContext,
97 DocumentChannelCreationArgs args);
99 async PWebSocketEventListener(uint64_t aInnerWindowID);
101 /* Predictor Methods */
102 async PredPredict(nsIURI targetURI, nsIURI sourceURI,
103 uint32_t reason, OriginAttributes originAttributes,
105 async PredLearn(nsIURI targetURI, nsIURI sourceURI,
106 uint32_t reason, OriginAttributes originAttributes);
109 async SpeculativeConnect(nsIURI uri, nsIPrincipal principal, bool anonymous);
110 async HTMLDNSPrefetch(nsString hostname, bool isHttps,
111 OriginAttributes originAttributes, uint32_t flags);
112 async CancelHTMLDNSPrefetch(nsString hostname, bool isHttps,
113 OriginAttributes originAttributes,
114 uint32_t flags, nsresult reason);
117 * channelId is used to establish a connection between redirect channels in
118 * the parent and the child when we're redirecting to a data: URI.
120 async PDataChannel(uint32_t channelId);
121 #ifdef MOZ_WIDGET_GTK
122 async PGIOChannel(nullable PBrowser browser, SerializedLoadContext loadContext, GIOChannelCreationArgs args);
124 async PSimpleChannel(uint32_t channelId);
125 async PFileChannel(uint32_t channelId);
127 async PClassifierDummyChannel(nsIURI uri, nsIURI aTopWindowURI,
128 nsresult aTopWindowURIResult,
129 LoadInfoArgs? loadInfo);
132 * These are called from the child with the results of the auth prompt.
133 * callbackId is the id that was passed in PBrowser::AsyncAuthPrompt,
134 * corresponding to an nsIAuthPromptCallback
136 async OnAuthAvailable(uint64_t callbackId, nsString user,
137 nsString password, nsString domain);
138 async OnAuthCancelled(uint64_t callbackId, bool userCancel);
140 async RequestContextLoadBegin(uint64_t rcid);
141 async RequestContextAfterDOMContentLoaded(uint64_t rcid);
142 async RemoveRequestContext(uint64_t rcid);
144 async PAltDataOutputStream(nsCString type, int64_t predictedSize, PHttpChannel channel);
146 async PStunAddrsRequest();
148 /* tabId is only required for web-proxy support, which isn't always needed */
149 async PWebrtcTCPSocket(TabId? tabId);
152 * WebExtension-specific remote resource loading
154 async GetExtensionStream(nsIURI uri) returns (nsIInputStream stream);
155 async GetExtensionFD(nsIURI uri) returns (FileDescriptor fd);
157 async InitSocketProcessBridge()
158 returns (Endpoint<PSocketProcessBridgeChild> endpoint);
159 async ResetSocketProcessBridge();
161 async EnsureHSTSData()
162 returns (bool result);
165 * Page thumbnails remote resource loading
167 async GetPageThumbStream(nsIURI uri) returns (nsIInputStream stream);
171 * Bring up the http auth prompt for a nested remote mozbrowser.
172 * NestedFrameId is the id corresponding to the PBrowser. It is the same id
173 * that was passed to the PBrowserOrId param in to the PHttpChannel constructor
175 async AsyncAuthPromptForNestedFrame(TabId nestedFrameId, nsCString uri,
176 nsString realm, uint64_t callbackId);
178 /* Predictor Methods */
179 async PredOnPredictPrefetch(nsIURI uri, uint32_t httpStatus);
180 async PredOnPredictPreconnect(nsIURI uri);
181 async PredOnPredictDNS(nsIURI uri);
183 async SpeculativeConnectRequest();
185 // Using medium high priority to deliver this notification possibly sooner than we
186 // enter poll() on the child process with infinite timeout.
187 [Priority=mediumhigh] async NetworkChangeNotification(nsCString type);
189 async PTransportProvider();
192 // Actually we need PTCPSocket() for parent. But ipdl disallows us having different
193 // signatures on parent and child. So when constructing the parent side object, we just
194 // leave host/port unused.
195 async PTCPSocket(nsString host, uint16_t port);
200 } // namespace mozilla