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;
13 include protocol PGIOChannel;
15 include protocol PWebSocket;
16 include protocol PWebSocketEventListener;
17 include protocol PTCPSocket;
18 include protocol PTCPServerSocket;
19 include protocol PUDPSocket;
20 include protocol PDNSRequest;
21 include protocol PDataChannel;
22 include protocol PSimpleChannel;
23 include protocol PTransportProvider;
24 include protocol PStunAddrsRequest;
25 include protocol PFileChannel;
26 include protocol PWebrtcTCPSocket;
27 include protocol PSocketProcessBridge;
28 include protocol PDocumentChannel;
31 include NeckoChannelParams;
32 include protocol PAltDataOutputStream;
34 include "mozilla/dom/PermissionMessageUtils.h";
36 using mozilla::dom::MaybeDiscardedBrowsingContext from "mozilla/dom/BrowsingContext.h";
37 using class IPC::SerializedLoadContext from "SerializedLoadContext.h";
38 using mozilla::dom::TabId from "mozilla/dom/ipc/IdType.h";
39 using nsIDNSService::DNSFlags from "nsIDNSService.h";
40 [RefCounted] using class nsIInputStream from "mozilla/ipc/IPCStreamUtils.h";
41 [RefCounted] using class nsIURI from "mozilla/ipc/URIUtils.h";
42 [RefCounted] using class nsIPrincipal from "nsIPrincipal.h";
48 //-------------------------------------------------------------------
49 [NestedUpTo=inside_cpow] sync protocol PNecko
53 manages PCookieService;
55 manages PWebSocketEventListener;
57 manages PTCPServerSocket;
64 manages PSimpleChannel;
66 manages PTransportProvider;
67 manages PAltDataOutputStream;
68 manages PStunAddrsRequest;
69 manages PWebrtcTCPSocket;
70 manages PDocumentChannel;
75 [Nested=inside_cpow] async PCookieService();
76 async PHttpChannel(nullable PBrowser browser,
77 SerializedLoadContext loadContext,
78 HttpChannelCreationArgs args);
80 async PWebSocket(nullable PBrowser browser, SerializedLoadContext loadContext,
82 async PTCPServerSocket(uint16_t localPort, uint16_t backlog, bool useArrayBuffers);
83 async PUDPSocket(nullable nsIPrincipal principal, nsCString filter);
85 async PDNSRequest(nsCString hostName, nsCString trrServer, int32_t port,
86 uint16_t type, OriginAttributes originAttributes,
89 async PDocumentChannel(MaybeDiscardedBrowsingContext browsingContext,
90 DocumentChannelCreationArgs args);
92 async PWebSocketEventListener(uint64_t aInnerWindowID);
94 /* Predictor Methods */
95 async PredPredict(nullable nsIURI targetURI, nullable nsIURI sourceURI,
96 uint32_t reason, OriginAttributes originAttributes,
98 async PredLearn(nullable nsIURI targetURI, nullable nsIURI sourceURI,
99 uint32_t reason, OriginAttributes originAttributes);
102 async SpeculativeConnect(nullable nsIURI uri,
103 nullable nsIPrincipal principal,
104 OriginAttributes? originAttributes,
106 async HTMLDNSPrefetch(nsString hostname, bool isHttps,
107 OriginAttributes originAttributes, DNSFlags flags);
108 async CancelHTMLDNSPrefetch(nsString hostname, bool isHttps,
109 OriginAttributes originAttributes,
110 DNSFlags flags, nsresult reason);
113 * channelId is used to establish a connection between redirect channels in
114 * the parent and the child when we're redirecting to a data: URI.
116 async PDataChannel(uint32_t channelId);
117 #ifdef MOZ_WIDGET_GTK
118 async PGIOChannel(nullable PBrowser browser, SerializedLoadContext loadContext, GIOChannelCreationArgs args);
120 async PSimpleChannel(uint32_t channelId);
121 async PFileChannel(uint32_t channelId);
123 async RequestContextLoadBegin(uint64_t rcid);
124 async RequestContextAfterDOMContentLoaded(uint64_t rcid);
125 async RemoveRequestContext(uint64_t rcid);
127 async PAltDataOutputStream(nsCString type, int64_t predictedSize, PHttpChannel channel);
129 async PStunAddrsRequest();
131 /* tabId is only required for web-proxy support, which isn't always needed */
132 async PWebrtcTCPSocket(TabId? tabId);
135 * WebExtension-specific remote resource loading
137 async GetExtensionStream(nullable nsIURI uri) returns (nullable nsIInputStream stream);
138 async GetExtensionFD(nullable nsIURI uri) returns (FileDescriptor fd);
140 async InitSocketProcessBridge()
141 returns (Endpoint<PSocketProcessBridgeChild> endpoint);
142 async ResetSocketProcessBridge();
144 async EnsureHSTSData()
145 returns (bool result);
148 * Page thumbnails remote resource loading
150 async GetPageThumbStream(nullable nsIURI uri, LoadInfoArgs loadInfo) returns (RemoteStreamInfo? info);
151 async GetPageIconStream(nullable nsIURI uri, LoadInfoArgs loadInfo) returns (RemoteStreamInfo? info);
154 /* Predictor Methods */
155 async PredOnPredictPrefetch(nullable nsIURI uri, uint32_t httpStatus);
156 async PredOnPredictPreconnect(nullable nsIURI uri);
157 async PredOnPredictDNS(nullable nsIURI uri);
159 async SpeculativeConnectRequest();
161 // Using medium high priority to deliver this notification possibly sooner than we
162 // enter poll() on the child process with infinite timeout.
163 [Priority=mediumhigh] async NetworkChangeNotification(nsCString type);
165 async PTransportProvider();
167 async SetTRRDomain(nsCString domain);
170 // Actually we need PTCPSocket() for parent. But ipdl disallows us having different
171 // signatures on parent and child. So when constructing the parent side object, we just
172 // leave host/port unused.
173 async PTCPSocket(nsString host, uint16_t port);
178 } // namespace mozilla