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);
112 async PDataChannel();
113 #ifdef MOZ_WIDGET_GTK
114 async PGIOChannel(nullable PBrowser browser, SerializedLoadContext loadContext, GIOChannelCreationArgs args);
116 async PSimpleChannel(uint32_t channelId);
117 async PFileChannel(uint32_t channelId);
119 async RequestContextLoadBegin(uint64_t rcid);
120 async RequestContextAfterDOMContentLoaded(uint64_t rcid);
121 async RemoveRequestContext(uint64_t rcid);
123 async PAltDataOutputStream(nsCString type, int64_t predictedSize, PHttpChannel channel);
125 async PStunAddrsRequest();
127 /* tabId is only required for web-proxy support, which isn't always needed */
128 async PWebrtcTCPSocket(TabId? tabId);
131 * WebExtension-specific remote resource loading
133 async GetExtensionStream(nullable nsIURI uri) returns (nullable nsIInputStream stream);
134 async GetExtensionFD(nullable nsIURI uri) returns (FileDescriptor fd);
136 async InitSocketProcessBridge()
137 returns (Endpoint<PSocketProcessBridgeChild> endpoint);
138 async ResetSocketProcessBridge();
140 async EnsureHSTSData()
141 returns (bool result);
144 * Page thumbnails remote resource loading
146 async GetPageThumbStream(nullable nsIURI uri, LoadInfoArgs loadInfo) returns (RemoteStreamInfo? info);
147 async GetPageIconStream(nullable nsIURI uri, LoadInfoArgs loadInfo) returns (RemoteStreamInfo? info);
150 /* Predictor Methods */
151 async PredOnPredictPrefetch(nullable nsIURI uri, uint32_t httpStatus);
152 async PredOnPredictPreconnect(nullable nsIURI uri);
153 async PredOnPredictDNS(nullable nsIURI uri);
155 async SpeculativeConnectRequest();
157 // Using medium high priority to deliver this notification possibly sooner than we
158 // enter poll() on the child process with infinite timeout.
159 [Priority=mediumhigh] async NetworkChangeNotification(nsCString type);
161 async PTransportProvider();
163 async SetTRRDomain(nsCString domain);
166 // Actually we need PTCPSocket() for parent. But ipdl disallows us having different
167 // signatures on parent and child. So when constructing the parent side object, we just
168 // leave host/port unused.
169 async PTCPSocket(nsString host, uint16_t port);
174 } // namespace mozilla