blob: 0774532851ff4eff56d958424d532da9e66261eb [file] [log] [blame]
Avi Drissman4e1b7bc32022-09-15 14:03:501// Copyright 2014 The Chromium Authors
ben76f52b242016-06-18 05:42:482// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5module content.mojom;
6
Dave Tapuskafc4adbae2020-12-02 22:08:597import "cc/mojom/browser_controls_state.mojom";
Arthur Hemery9c035732019-01-07 16:12:418import "content/common/frame_messages.mojom";
Jeremy Roman62fee222019-07-09 17:34:149import "content/common/native_types.mojom";
Arthur Hemeryd3011f62018-05-30 10:38:4410import "content/common/navigation_client.mojom";
Miyoung Shin072d4052020-07-13 07:52:4411import "content/common/web_ui.mojom";
Jiewei Qiancc639a662022-04-01 02:43:3412import "content/public/common/extra_mojo_js_features.mojom";
csharrison95f01e922017-04-24 18:52:3513import "content/public/common/window_container_type.mojom";
Daniel Chengd1b775552021-02-19 18:50:0214import "ipc/constants.mojom";
Mario Sanchez Prada13bbad52020-06-01 18:12:2915import "mojo/public/mojom/base/file_path.mojom";
Ken Rockot8b447d72018-02-03 20:30:4716import "mojo/public/mojom/base/string16.mojom";
Dominic Mazzoni77d0aba2021-01-14 09:42:1617import "mojo/public/mojom/base/time.mojom";
Oksana Zhuravlova34579e912018-03-23 00:18:4918import "mojo/public/mojom/base/unguessable_token.mojom";
Hajime Hoshi35ad74f2019-03-07 08:38:0519import "mojo/public/mojom/base/values.mojom";
Bo Liub5e79d92021-06-12 01:40:4120import "skia/public/mojom/skcolor.mojom";
arthursonzogni42eabe012020-01-17 15:55:5621import "services/network/public/mojom/content_security_policy.mojom";
Daniel Chengd1b775552021-02-19 18:50:0222import "services/network/public/mojom/url_loader.mojom";
Dave Tapuska2a6046a2021-03-01 22:42:5223import "services/network/public/mojom/url_loader_factory.mojom";
24import "services/network/public/mojom/url_request.mojom";
arthursonzogni42eabe012020-01-17 15:55:5625import "services/network/public/mojom/url_response_head.mojom";
Ken Rockot543f5e32018-02-04 02:13:5026import "services/service_manager/public/mojom/interface_provider.mojom";
Miyoung Shin99505dd2019-07-27 12:45:3527import "services/viz/public/mojom/compositing/surface_id.mojom";
Dominic Farolino12e06d72022-08-05 02:29:4928import "third_party/blink/public/mojom/associated_interfaces/associated_interfaces.mojom";
Blink Reformata30d4232018-04-07 15:31:0629import "third_party/blink/public/mojom/blob/blob_url_store.mojom";
Dave Tapuska4e60c232020-11-05 15:49:3230import "third_party/blink/public/mojom/browser_interface_broker.mojom";
Julie Jeongeun Kim42a90df2019-03-20 23:13:1031import "third_party/blink/public/mojom/commit_result/commit_result.mojom";
Minggang Wangb9f3fa92021-07-01 15:30:3132import "third_party/blink/public/mojom/conversions/conversions.mojom";
Lowell Mannersf03ea5a2019-04-23 11:47:5833import "third_party/blink/public/mojom/devtools/console_message.mojom";
Dominic Farolino6d261e02021-08-18 15:12:3034import "third_party/blink/public/mojom/fenced_frame/fenced_frame.mojom";
Dave Tapuska4e60c232020-11-05 15:49:3235import "third_party/blink/public/mojom/frame/frame_owner_properties.mojom";
36import "third_party/blink/public/mojom/frame/frame_policy.mojom";
Gyuyoung Kimc16e52e92021-03-19 02:45:3737import "third_party/blink/public/mojom/frame/frame_replication_state.mojom";
Dave Tapuskad6703f912019-01-31 23:13:1138import "third_party/blink/public/mojom/frame/lifecycle.mojom";
Antonio Sartori7f809cc72020-10-30 07:47:2039import "third_party/blink/public/mojom/frame/policy_container.mojom";
Lei Zhang96fce972022-08-05 23:15:0740import "third_party/blink/public/mojom/frame/remote_frame.mojom";
Dave Tapuska4e60c232020-11-05 15:49:3241import "third_party/blink/public/mojom/frame/tree_scope_type.mojom";
Daniel Chengd1b775552021-02-19 18:50:0242import "third_party/blink/public/mojom/loader/referrer.mojom";
Antonio Sartori6984c742021-08-26 08:03:4143import "third_party/blink/public/mojom/navigation/navigation_policy.mojom";
Minggang Wangee5af392020-02-05 02:55:2844import "third_party/blink/public/mojom/loader/resource_load_info.mojom";
Hiroki Nakagawa753758342018-12-27 04:13:4945import "third_party/blink/public/mojom/loader/url_loader_factory_bundle.mojom";
Yuzu Saijoaae91702019-03-13 07:38:0546import "third_party/blink/public/mojom/messaging/transferable_message.mojom";
Minggang Wangb9f3fa92021-07-01 15:30:3147import "third_party/blink/public/mojom/navigation/navigation_params.mojom";
Yuzu Saijod46f498a2020-08-04 02:56:2248import "third_party/blink/public/mojom/page/page.mojom";
Tommy Steimel991916c42022-06-24 20:59:5749import "third_party/blink/public/mojom/picture_in_picture_window_options/picture_in_picture_window_options.mojom";
Sharon Yang2abe1982021-10-01 15:56:3450import "third_party/blink/public/mojom/widget/platform_widget.mojom";
Dave Tapuska8499eec2020-03-16 17:54:3051import "third_party/blink/public/mojom/page/widget.mojom";
Lucas Furukawa Gadani89a74182019-01-10 19:33:2252import "third_party/blink/public/mojom/portal/portal.mojom";
Daniel Chengd1b775552021-02-19 18:50:0253import "third_party/blink/public/mojom/renderer_preferences.mojom";
Hiroki Nakagawacdbc7912018-11-30 11:30:0554import "third_party/blink/public/mojom/service_worker/controller_service_worker.mojom";
Hiroki Nakagawa077f20962020-05-15 08:04:4455import "third_party/blink/public/mojom/service_worker/service_worker_container.mojom";
Chris Hamiltona46b15442020-07-31 14:38:5656import "third_party/blink/public/mojom/tokens/tokens.mojom";
Daniel Chengd1b775552021-02-19 18:50:0257import "third_party/blink/public/mojom/webpreferences/web_preferences.mojom";
Dave Tapuska9a31f412020-07-20 17:01:2858import "third_party/blink/public/mojom/widget/visual_properties.mojom";
Julie Jeongeun Kim42a90df2019-03-20 23:13:1059import "third_party/blink/public/mojom/window_features/window_features.mojom";
Mario Sanchez Prada5d7f1ac2020-07-16 17:18:4060import "ui/accessibility/mojom/ax_tree_update.mojom";
Julie Jeongeun Kim2b1d45a2019-06-28 23:37:5461import "ui/base/mojom/window_open_disposition.mojom";
Miyoung Shin87943f502019-07-26 13:31:5862import "ui/gfx/geometry/mojom/geometry.mojom";
Yoshisato Yanagisawa66845bf2022-05-12 04:04:0263import "url/mojom/scheme_host_port.mojom";
Kevin McNeeea7f3b82020-02-27 21:42:3264import "url/mojom/url.mojom";
ben76f52b242016-06-18 05:42:4865
Daniel Chengd1b775552021-02-19 18:50:0266// A View (i.e. a "main frame") can be created for a few different cases, these
67// values are used to specify which it is.
68enum ViewWidgetType {
69 // A standard view that's the top-level widget in a frame hierarchy.
70 kTopLevel,
71 // A GuestView used to render contents inside a <webview> element.
72 kGuestView,
73 // A view used to render contents inside a <portal> element.
Dave Tapuskaefc4936a2021-10-05 20:47:1074 kPortal,
75 // A view used to render contents inside a <fencedframe> element.
76 kFencedFrame
Daniel Chengd1b775552021-02-19 18:50:0277};
78
Kevin McNee43fe8292021-10-04 22:59:4179// The type of the frame owner element for a child frame. In cross-process
80// frames, this would be the type of the HTMLFrameOwnerElement for the remote
81// child frame in the parent process. Note that only HTMLFrameOwnerElements for
82// which CreateChildFrame is used are included here. Other
83// HTMLFrameOwnerElements such as portals do not use this.
84enum ChildFrameOwnerElementType {
85 kIframe,
86 kObject,
87 kEmbed,
88 kFrame,
89 // Note that only Fenced Frames based on Shadow DOM may create child frames.
90 // See crbug.com/1123606.
91 kFencedframe
92};
93
Daniel Chengd1b775552021-02-19 18:50:0294struct CreateViewParams {
95 // Renderer-wide preferences.
96 blink.mojom.RendererPreferences renderer_preferences;
97
98 // Preferences for this view.
99 blink.mojom.WebPreferences web_preferences;
100
Daniel Chengd1b775552021-02-19 18:50:02101 // The session storage namespace ID this view should use.
102 string session_storage_namespace_id;
103
Anton Bikineevf62d1bf2021-05-15 17:56:07104 // The frame token of the opener frame if one exists, or absl::nullopt
Daniel Chengd1b775552021-02-19 18:50:02105 // otherwise.
Chris Hamilton2ea20312021-02-24 17:20:14106 blink.mojom.FrameToken? opener_frame_token;
Daniel Chengd1b775552021-02-19 18:50:02107
Daniel Cheng4daa51222021-02-21 07:20:11108 // Information that needs to be replicated to the view's main frame, e.g.
109 // frame name and sandbox flags.
Gyuyoung Kimc16e52e92021-03-19 02:45:37110 blink.mojom.FrameReplicationState replication_state;
Daniel Cheng4daa51222021-02-21 07:20:11111
112 // Used for devtools instrumentation and trace-ability. The token is shared
113 // across all frames (local or remotes) representing the same logical frame
114 // tree node, and is used by Blink and content to tag calls and requests for
115 // instrumentation purposes, allowing them to be attributed to a context
116 // frame.
117 //
118 // Must not be used to look up a RenderFrameHostImpl or RenderFrameProxyHost
119 // in the browser process, as the token is shared, making the mapping
120 // ambiguous and non-authoritative.
121 mojo_base.mojom.UnguessableToken devtools_main_frame_token;
122
Daniel Chengd1b775552021-02-19 18:50:02123 CreateMainFrameUnion main_frame;
124
Dave Tapuska2cf1f532022-08-10 15:30:49125 // Whether the `blink::WebView` should initially be hidden.
Daniel Chengd1b775552021-02-19 18:50:02126 bool hidden;
127
Dave Tapuska2cf1f532022-08-10 15:30:49128 // Prerender2: Whether the `blink::WebView` is for a prerendered page.
Matt Falkenhagen84e9a9b2021-07-13 23:12:54129 bool is_prerendering;
130
Dave Tapuska2cf1f532022-08-10 15:30:49131 // When true, all RenderWidgets under this `blink::WebView` will never be
132 // shown to the user, and thus never composited, and will not need to produce
133 // pixels for display. This allows the renderer to optimize and avoid
134 // resources used for displaying graphical output.
Daniel Chengd1b775552021-02-19 18:50:02135 bool never_composited;
136
Rakina Zata Amnic7ffea882021-08-16 10:04:28137 // Whether the window associated with this view was created by another window.
138 bool window_was_opened_by_another_window;
Daniel Chengd1b775552021-02-19 18:50:02139
Daniel Chengd1b775552021-02-19 18:50:02140 // Indicates whether the view is a regular top-level widget or some other
141 // nested "main frame" widget type.
142 ViewWidgetType type;
143
Liam Brady5f6995322022-04-04 18:56:24144 // If the frame being created is a fenced frame, stores the mode the fenced
145 // frame is set to. For all other frame types (type != kFencedFrame), this
146 // value will always be set to kDefault. Frames embedded in fenced frames
147 // will also have this value set to kDefault.
148 // Used by fenced frames to determine various security restrictions such as
149 // the URL type and size constraints.
150 blink.mojom.FencedFrameMode fenced_frame_mode;
151
Daniel Chengd1b775552021-02-19 18:50:02152 // Endpoint for any messages that are broadcast to all views in a WebContents.
153 pending_associated_receiver<blink.mojom.PageBroadcast> blink_page_broadcast;
Bo Liub5e79d92021-06-12 01:40:41154
155 // Base background color of this view. Only used by a local main frame.
156 skia.mojom.SkColor? base_background_color;
Daniel Chengd1b775552021-02-19 18:50:02157};
158
Daniel Chengd1b775552021-02-19 18:50:02159// A union to distinguish between parameters specific to local main frame
160// creation and remote main frame creation.
161union CreateMainFrameUnion {
162 CreateLocalMainFrameParams local_params;
163 CreateRemoteMainFrameParams remote_params;
164};
165
166// Parameters used for browser-initiated local main frame creation.
167struct CreateLocalMainFrameParams {
Daniel Cheng4daa51222021-02-21 07:20:11168 // The frame token. Used to map between LocalFrame and RenderFrameHostImpl.
169 blink.mojom.LocalFrameToken token;
170
Daniel Chengd1b775552021-02-19 18:50:02171 // The ID of the main frame hosted in the view. Must not be kRoutingIdNone.
172 int32 routing_id = IPC.mojom.kRoutingIdNone;
173
174 // The communication interfaces for the WebLocalFrame in blink.
175 pending_associated_receiver<content.mojom.Frame> frame;
176
177 pending_remote<blink.mojom.BrowserInterfaceBroker> interface_broker;
178
Dominic Farolino12e06d72022-08-05 02:29:49179 // The `AssociatedInterfaceProvider` that the main `RenderFrameImpl` will use
180 // to request associated interfaces from its corresponding
181 // `RenderFrameHostImpl`.
182 pending_associated_remote<blink.mojom.AssociatedInterfaceProvider>
183 associated_interface_provider_remote;
184
Rakina Zata Amni86c88fa2021-11-01 01:27:30185 // Whether the frame is still on the initial empty document or not.
186 bool is_on_initial_empty_document = true;
Daniel Chengd1b775552021-02-19 18:50:02187
188 // Null when the main frame has no policy container yet (for example, because
189 // it is a speculative RenderFrameHost), and the policy container will be
190 // sent during CommitNavigation.
191 blink.mojom.PolicyContainer? policy_container;
192
193 CreateFrameWidgetParams widget_params;
Lukasz Anforowicz7624ae22021-04-14 16:17:50194
195 // Subresource loader factories to be used by the initial empty document.
196 blink.mojom.URLLoaderFactoryBundle subresource_loader_factories;
Daniel Chengd1b775552021-02-19 18:50:02197};
198
199// Parameters used for brower-initiated remote main frame creation.
200struct CreateRemoteMainFrameParams {
Daniel Cheng4daa51222021-02-21 07:20:11201 blink.mojom.RemoteFrameToken token;
202
Dave Tapuska82b54012022-07-15 23:26:10203 // The communication channels for the Remote/RemoteMainFrame in this view.
Dave Tapuska0fcfeb782022-07-27 19:44:40204 blink.mojom.RemoteFrameInterfacesFromBrowser frame_interfaces;
Dave Tapuska51dcc9e2022-08-03 14:09:48205 blink.mojom.RemoteMainFrameInterfaces main_frame_interfaces;
Daniel Chengd1b775552021-02-19 18:50:02206};
207
208// Parameters used for creating a new frame widget.
209struct CreateFrameWidgetParams {
210 // Gives the routing ID for the RenderWidget that will be attached to the
211 // new RenderFrame.
212 int32 routing_id;
213
214 // The communication interfaces for the WebFrameWidget in blink.
215 pending_associated_remote<blink.mojom.FrameWidgetHost> frame_widget_host;
216 pending_associated_receiver<blink.mojom.FrameWidget> frame_widget;
217 pending_associated_remote<blink.mojom.WidgetHost> widget_host;
218 pending_associated_receiver<blink.mojom.Widget> widget;
219
220 // The initial visual properties of the widget.
221 blink.mojom.VisualProperties visual_properties;
222};
223
224// Used for recreating child frames after a crash (does this still happen?) and
225// speculative/provisional frames (including main frame).
226//
227// "Normal" child frame creation (via inserting a new frame owner element into
228// the active document) does not use these params and is routed via
229// CreateChildFrame().
230//
231// "Normal" main frame creation (whether browser-initiated, e.g. opening a new
232// tab, or renderer-initiated, e.g. window.open()) also do not use these params
233// and are routed via CreateView() and CreateNewWindow() respectively.
234//
Daniel Chengd1b775552021-02-19 18:50:02235struct CreateFrameParams {
Daniel Cheng4daa51222021-02-21 07:20:11236 // The frame token. Used to map between LocalFrame and RenderFrameHostImpl.
237 blink.mojom.LocalFrameToken token;
238
Daniel Chengd1b775552021-02-19 18:50:02239 // Specifies the routing ID of the new RenderFrame object.
240 int32 routing_id;
241
Dave Tapuskafd3d5ed2022-06-28 17:03:07242 // If a valid |previous_frame_token| is provided, the new frame will be
Daniel Chengd1b775552021-02-19 18:50:02243 // configured to replace either the previous frame or the previous proxy on
244 // commit.
Dave Tapuskafd3d5ed2022-06-28 17:03:07245 blink.mojom.FrameToken? previous_frame_token;
Daniel Chengd1b775552021-02-19 18:50:02246
Daniel Chengd1b775552021-02-19 18:50:02247 // Specifies the new frame's opener. The opener will be null if this is
Anton Bikineevf62d1bf2021-05-15 17:56:07248 // absl::nullopt.
Chris Hamilton2ea20312021-02-24 17:20:14249 blink.mojom.FrameToken? opener_frame_token;
Daniel Chengd1b775552021-02-19 18:50:02250
Dave Tapuskafd3d5ed2022-06-28 17:03:07251 // The new frame should be created as a child of the object identified by
252 // `parent_frame_token`. If this is not specified it will be a a top level
253 // frame.
254 blink.mojom.FrameToken? parent_frame_token;
Daniel Chengd1b775552021-02-19 18:50:02255
256 // Identifies the previous sibling of the new frame, so that the new frame is
257 // inserted into the correct place in the frame tree. If this is
Dave Tapuskafd3d5ed2022-06-28 17:03:07258 // not specified the frame will be created as the leftmost child of its
Daniel Chengd1b775552021-02-19 18:50:02259 // parent frame, in front of any other children.
Dave Tapuskafd3d5ed2022-06-28 17:03:07260 blink.mojom.FrameToken? previous_sibling_frame_token;
Daniel Chengd1b775552021-02-19 18:50:02261
262 pending_remote<blink.mojom.BrowserInterfaceBroker> interface_broker;
263
Daniel Cheng6ac128172021-05-25 18:49:01264 blink.mojom.TreeScopeType tree_scope_type;
265
Daniel Chengd1b775552021-02-19 18:50:02266 // When the new frame has a parent, |replication_state| holds the new frame's
267 // properties replicated from the process rendering the parent frame, such as
268 // the new frame's sandbox flags.
Gyuyoung Kimc16e52e92021-03-19 02:45:37269 blink.mojom.FrameReplicationState replication_state;
Daniel Chengd1b775552021-02-19 18:50:02270
271 // Used for devtools instrumentation and trace-ability. The token is
272 // propagated to Blink's LocalFrame and both Blink and content/
273 // can tag calls and requests with this instrumentation token in order to
274 // attribute them to the context frame.
275 // |devtools_frame_token| is only defined by the browser and is never
276 // sent back from the renderer in the control calls.
277 mojo_base.mojom.UnguessableToken devtools_frame_token;
278
279 // When the new frame has a parent, |frame_owner_properties| holds the
280 // properties of the HTMLFrameOwnerElement from the parent process.
281 // Note that unlike FrameReplicationState, this is not replicated for remote
282 // frames.
283 blink.mojom.FrameOwnerProperties frame_owner_properties;
284
285 // Specifies properties for a new RenderWidget that will be attached to the
286 // new RenderFrame (if one is needed).
287 CreateFrameWidgetParams? widget_params;
288
Rakina Zata Amni86c88fa2021-11-01 01:27:30289 // Whether the frame is still on the initial empty document or not.
290 bool is_on_initial_empty_document = true;
Daniel Chengd1b775552021-02-19 18:50:02291
292 // The policy container for the frame to be created. This can be null if we
293 // could not determine a policy container yet, for example in case of a
294 // speculative RenderFrameHost. In that case, the final policy container will
295 // be sent along CommitNavigation.
296 blink.mojom.PolicyContainer? policy_container;
297
298 // The mojo connection to the mojom::Frame in the renderer.
299 pending_associated_receiver<content.mojom.Frame> frame;
Dominic Farolino12e06d72022-08-05 02:29:49300
301 // The `AssociatedInterfaceProvider` that the `RenderFrameImpl` will use to
302 // request associated interfaces from its corresponding `RenderFrameHostImpl`.
303 pending_associated_remote<blink.mojom.AssociatedInterfaceProvider>
304 associated_interface_provider_remote;
Daniel Chengd1b775552021-02-19 18:50:02305};
306
Mario Sanchez Prada13bbad52020-06-01 18:12:29307// Provided with each call to Frame::GetSerializedHtmlWithLocalLinks() so that
308// the renderer can notify the browser process each time that a chunk of HTML
309// data gets serialized, as well as when the entire process is finished.
310interface FrameHTMLSerializerHandler {
311 // Sent by the renderer as a response to GetSerializedHtmlWithLocalLinks() to
312 // indicate that HTML data has been serialized, included in |data_buffer|.
313 DidReceiveData(string data_buffer);
314
315 // Reports that the serialization process is finished. It is expected to
316 // receive this message right after the last time DidReceiveData() is called.
317 Done();
318};
319
Dominic Mazzoni77d0aba2021-01-14 09:42:16320struct SnapshotAccessibilityTreeParams {
321 // See ui/accessibility/ax_mode.h for valid values of |ax_mode|.
322 uint32 ax_mode;
323
324 // If true, nodes that are entirely offscreen will have their entire
325 // subtree excluded. Note that this heuristic is imperfect, and
326 // an absolute-positioned node that's visible, but whose ancestors
327 // are entirely offscreen, may get excluded.
328 bool exclude_offscreen;
329
330 // The maximum number of nodes to snapshot before exiting early.
331 // Note that this is not a hard limit; once this limit is reached a
332 // few more nodes may be added in order to ensure a well-formed
333 // tree is returned. Use 0 for no max. The corresponding C++ code
334 // uses size_t.
335 uint64 max_nodes;
336
337 // The maximum amount of time to spend snapshotting the tree. Like
338 // max_nodes, this is not a hard limit, and once this limit is reached
339 // a few more nodes may be added in order to ensure a well-formed tree.
340 // Use 0 for no timeout.
341 mojo_base.mojom.TimeDelta timeout;
342};
343
Dave Tapuska795de45a2021-01-12 20:48:05344// An enumeration specifying the reason of the frame deletion.
345enum FrameDeleteIntention {
346 // The frame being deleted isn't a (speculative) main frame.
347 kNotMainFrame,
348 // The frame being deleted is a speculative main frame, and it is being
349 // deleted as part of the shutdown for that WebContents. The entire RenderView
350 // etc will be destroyed by a separate IPC sent later.
351 kSpeculativeMainFrameForShutdown,
352 // The frame being deleted is a speculative main frame, and it is being
353 // deleted because the speculative navigation was cancelled. This is not part
354 // of shutdown.
355 kSpeculativeMainFrameForNavigationCancelled,
356};
357
danakj0bdfacd2021-01-20 19:27:18358// Implemented by the frame provider, and must be associated with other content
359// mojoms bound to frames, widgets, views, and currently also with the legacy
360// IPC channel.
Arthur Hemeryd3011f62018-05-30 10:38:44361// KEEP THE COMMIT FUNCTIONS IN SYNC in content/common/navigation_client.mojom.
danakj0bdfacd2021-01-20 19:27:18362// These will eventually be removed from Frame.
363interface Frame {
clamyaf4bf2d92018-02-06 10:54:36364 // Tells the renderer that a same-document navigation should be committed.
365 // The renderer will return a status value indicating whether the commit
366 // could proceed as expected or not. In particular, it might be necessary to
367 // restart the navigation if it is no-longer same-document, which can happen
368 // if the renderer committed another navigation in the meantime.
369 CommitSameDocumentNavigation(
Minggang Wangb9f3fa92021-07-01 15:30:31370 blink.mojom.CommonNavigationParams common_params,
371 blink.mojom.CommitNavigationParams request_params)
clamyaf4bf2d92018-02-06 10:54:36372 => (blink.mojom.CommitResult commit_result);
373
Chong Zhang7306b0b2018-01-24 05:59:24374 // Provides the renderer an updated |subresource_loader_factories|.
375 //
376 // This method is intended to fix broken loaders after a Network Service
377 // crash, and is only used when Network Service is enabled.
378 //
379 // The new bundle contains replacement factories for a subset of the
380 // receiver's existing bundle.
381 UpdateSubresourceLoaderFactories(
Hiroki Nakagawa753758342018-12-27 04:13:49382 blink.mojom.URLLoaderFactoryBundle subresource_loader_factories);
Dmitry Gozman6adf95b2018-10-10 22:12:19383
Ian Barkley-Yeungbda77fb2020-12-08 04:26:46384 // Indicates that the frame host (browser) wants the |untrusted_stack_trace|
385 // parameter of DidAddMessageToConsole() filled in for Error messages if at
386 // all possible.
387 SetWantErrorMessageStackTrace();
388
Dave Tapuskaca250702021-01-07 17:40:55389 // Unload this RenderFrame and replace it by a RenderFrameProxy, so the frame
390 // can navigate to a document rendered by a different process. The unload can
391 // fail if the RenderFrame is currently detached (it was removed from the
392 // frame tree before the Unload was received). If successful this message will
393 // send back AgentSchedulingGroupHost::DidUnloadRenderFrame message. This
394 // cannot be a standard reply callback because the unload acknowledgement must
395 // be posted back to the event loop to be invoked later. This is to ensure
396 // that any postMessage() calls executed by JS during unload are dispatched,
397 // since postMessage dispatch is always scheduled asynchronously.
Daniel Chengc3d1e8d2021-06-23 02:11:45398 //
Dave Tapuska82b54012022-07-15 23:26:10399 // `new_remote_frame_replication_state`, `new_remote_frame_token`,
400 // and `new_remote_main_frame_interfaces` are used to construct the new
401 // RenderFrameProxy. `is_loading` mirrors the loading state of the
402 // FrameTreeNode's current RenderFrameHost and determines whether
Daniel Chengc3d1e8d2021-06-23 02:11:45403 // the newly-constructed RenderFrameProxy is marked as loading or not.
Yeunjoo Choi355f769d2021-05-20 05:32:28404 Unload(
Yeunjoo Choi355f769d2021-05-20 05:32:28405 bool is_loading,
406 blink.mojom.FrameReplicationState new_remote_frame_replication_state,
407 blink.mojom.RemoteFrameToken new_remote_frame_token,
Dave Tapuska0fcfeb782022-07-27 19:44:40408 blink.mojom.RemoteFrameInterfacesFromBrowser new_remote_frame_interfaces,
Dave Tapuska51dcc9e2022-08-03 14:09:48409 blink.mojom.RemoteMainFrameInterfaces new_remote_main_frame_interfaces);
Dave Tapuska795de45a2021-01-12 20:48:05410
411 // Delete the frame. This is only called for child frames that the browser
412 // wants to detach, or for speculative main frames which are owned by the
413 // browser process. Committed main frames are owned by the renderer's WebView
414 // and can not be deleted directly.
415 Delete(FrameDeleteIntention intention);
danakj0bdfacd2021-01-20 19:27:18416
Daniel Chengc3d1e8d2021-06-23 02:11:45417 // Requests that a speculative RenderFrameHost which the browser has already
418 // sent a `CommitNavigation()` to should swap itself back out for a
419 // RenderFrameProxy to effectively undo the `CommitNavigation()`.
420 //
421 // This is needed when discarding a speculative RenderFrameHost that's already
422 // been asked to commit a navigation, as the state between the browser and
423 // renderer would otherwise be out of sync:
424 //
425 // - from the perspective of the browser process, the speculative
426 // RenderFrameHost has not yet committed as it has not yet acknowledged the
427 // `CommitNavigation()` with `DidCommitNavigation()`.
428 // - but any IPCs sent from the browser to the renderer will see that the
429 // provisional RenderFrame has already been swapped in and the
430 // RenderFrameProxy it replaced destroyed.
431 //
432 // Note: This, of course, does not work for RenderDocument, since the
433 // provisional RenderFrame replaces *another* RenderFrame when it commits. The
434 // state associated with the replaced RenderFrame is already gone, and it's
435 // impossible to restore it. Fixing this issue for RenderDocument will
436 // require serious reworking of how navigations are committed.
437 //
438 // While this is very similar to `Unload()`, the renderer will not send any
439 // unload ACK back to the browser on completion. As a result, there is no
440 // special handling to ensure messages queued by Window.postMessage() are
441 // forwarded.
442 //
Dave Tapuska82b54012022-07-15 23:26:10443 // `new_remote_frame_replication_state`, `new_remote_frame_token`, and
444 // `new_remote_main_frame_interfaces` are used to construct the new
445 // RenderFrameProxy. `is_loading` mirrors the loading state of the
446 // FrameTreeNode's current RenderFrameHost and determines whether
Daniel Chengc3d1e8d2021-06-23 02:11:45447 // the newly-constructed RenderFrameProxy is marked as loading or not.
448 //
449 // TODO(dcheng): It's unclear if `is_loading` is necessary; presently, it
450 // always seems to be true when this IPC is called.
451 UndoCommitNavigation(
Daniel Chengc3d1e8d2021-06-23 02:11:45452 bool is_loading,
453 blink.mojom.FrameReplicationState new_remote_frame_replication_state,
454 blink.mojom.RemoteFrameToken new_remote_frame_token,
Dave Tapuska0fcfeb782022-07-27 19:44:40455 blink.mojom.RemoteFrameInterfacesFromBrowser new_remote_frame_interfaces,
Dave Tapuska51dcc9e2022-08-03 14:09:48456 blink.mojom.RemoteMainFrameInterfaces new_remote_main_frame_interfaces);
Daniel Chengc3d1e8d2021-06-23 02:11:45457
danakj0bdfacd2021-01-20 19:27:18458 // Causes all new subresource requests to be blocked (not being started) until
459 // ResumeBlockedRequests is called.
460 BlockRequests();
461
462 // Resumes blocked requests.
463 // It is safe to call this without calling BlockRequests.
464 ResumeBlockedRequests();
465
466 GetInterfaceProvider(
467 pending_receiver<service_manager.mojom.InterfaceProvider> interfaces);
468
danakj0bdfacd2021-01-20 19:27:18469 // Requests a one-time snapshot of the accessibility tree without enabling
470 // accessibility if it wasn't already enabled.
471 SnapshotAccessibilityTree(SnapshotAccessibilityTreeParams params)
472 => (ax.mojom.AXTreeUpdate snapshot);
473
Abigail Kleina303f272022-03-31 22:32:57474 // Requests a one-time distillation of the accessibility tree without enabling
475 // accessibility if it wasn't already enabled.
476 SnapshotAndDistillAXTree() => (ax.mojom.AXTreeUpdate snapshot,
Abigail Klein277fe7c22022-04-11 21:38:45477 array<int32> content_node_ids);
Abigail Kleina303f272022-03-31 22:32:57478
danakj0bdfacd2021-01-20 19:27:18479 // Get HTML data by serializing the target frame and replacing all resource
480 // links with a path to the local copy passed in the message payload. In order
481 // to report progress to the the browser process, a pending remote is passed
482 // via |callback_remote|, so that direct communication with the SavePackage
483 // object that initiated the process can be established.
484 GetSerializedHtmlWithLocalLinks(
485 map<url.mojom.Url, mojo_base.mojom.FilePath> url_map,
Chris Hamilton2ea20312021-02-24 17:20:14486 map<blink.mojom.FrameToken, mojo_base.mojom.FilePath>
danakj0bdfacd2021-01-20 19:27:18487 frame_token_map, bool save_with_empty_url,
488 pending_remote<FrameHTMLSerializerHandler> handler_remote);
Ken Rockot48785452017-10-25 19:33:14489};
490
sammc7f6c6a02017-01-30 00:53:51491// Implemented by the frame (e.g. renderer processes).
492// Instances of this interface must be associated with (i.e., FIFO with) the
493// legacy IPC channel.
494interface FrameBindingsControl {
495 // Used to tell a render frame whether it should expose various bindings
496 // that allow JS content extended privileges. See BindingsPolicy for valid
497 // flag values.
498 AllowBindings(int32 enabled_bindings_flags);
Nasko Oskov8a73f7d2019-09-27 22:29:32499
500 // Used to tell the RenderFrame to enable Mojo JS bindings, which allows
501 // JS code running in the renderer process to connect to Mojo interfaces
502 // and make method calls on them.
Jiewei Qiancc639a662022-04-01 02:43:34503 //
504 // ExtraMojoJsFeatures describes a set of additional features that can be
505 // used with MojoJs. For example, helper methods for MojoJs to better work
506 // with Web API objects.
507 //
Nasko Oskov8a73f7d2019-09-27 22:29:32508 // This is used for WebUI only at this time.
Jiewei Qiancc639a662022-04-01 02:43:34509 EnableMojoJsBindings(ExtraMojoJsFeatures? features);
Miyoung Shin072d4052020-07-13 07:52:44510
Jiewei Qiancf6b35a2021-08-25 04:43:46511 // Used to enable MojoJS bindings, exposing only the interfaces provided
512 // by `broker`.
513 EnableMojoJsBindingsWithBroker(
514 pending_remote<blink.mojom.BrowserInterfaceBroker> broker);
515
Miyoung Shin072d4052020-07-13 07:52:44516 // Used to bind WebUI and WebUIHost mojo connections.
Daniel Cheng4b931a4f2020-12-18 01:59:35517 BindWebUI(pending_associated_receiver<content.mojom.WebUI> receiver,
518 pending_associated_remote<content.mojom.WebUIHost> remote);
sammc7f6c6a02017-01-30 00:53:51519};
520
csharrison95f01e922017-04-24 18:52:35521struct CreateNewWindowParams {
Mustaq Ahmed8601a562020-01-31 18:05:52522 // True if ContentRendererClient allows popups. This is the case only for
523 // extensions.
524 bool allow_popup;
csharrison95f01e922017-04-24 18:52:35525
526 // Type of window requested.
527 WindowContainerType window_container_type;
528
529 // The session storage namespace ID this window should use.
Daniel Murphy31bbb8b12018-02-07 21:44:10530 string session_storage_namespace_id;
csharrison95f01e922017-04-24 18:52:35531
Daniel Murphye3eec92c2018-02-23 19:09:15532 // The session storage namespace ID this window should clone from.
533 // TODO(dmurph): Remove this once session storage is fully mojo'd, as the
534 // clone call happens on a different interface. https://crbug.com/716490
535 string clone_from_session_storage_namespace_id;
536
csharrison95f01e922017-04-24 18:52:35537 // The name of the resulting frame that should be created (empty if none
538 // has been specified). UTF8 encoded string.
539 string frame_name;
540
csharrison95f01e922017-04-24 18:52:35541 // Whether the opener will be suppressed in the new window, in which case
542 // scripting the new window is not allowed.
543 bool opener_suppressed;
544
jongdeok.kim5de823b32022-06-14 04:37:50545 // Whether new window is created for a form submission.
546 bool is_form_submission;
547
548 // Body of HTTP POST request for form submission.
549 network.mojom.URLRequestBody? form_submission_post_data;
550
551 // The content type from the request headers for POST requests.
552 string form_submission_post_content_type;
553
csharrison95f01e922017-04-24 18:52:35554 // Whether the window should be opened in the foreground, background, etc.
555 ui.mojom.WindowOpenDisposition disposition;
556
557 // The URL that will be loaded in the new window (empty if none has been
558 // specified).
559 url.mojom.Url target_url;
560
561 // The referrer that will be used to load |target_url| (empty if none has
562 // been specified).
563 blink.mojom.Referrer referrer;
564
565 // The window features to use for the new window.
566 blink.mojom.WindowFeatures features;
John Delaney8623c642021-01-06 17:37:07567
568 // The impression associated with the navigation in the new window, if
569 // one is specified.
Minggang Wangb9f3fa92021-07-01 15:30:31570 blink.mojom.Impression? impression;
Antonio Sartori6984c742021-08-26 08:03:41571
572 // Governs how downloads are handled if `target_url` results in a download.
573 blink.mojom.NavigationDownloadPolicy download_policy;
Tommy Steimel991916c42022-06-24 20:59:57574
575 // Additional parameters for creating picture-in-picture windows.
576 blink.mojom.PictureInPictureWindowOptions? pip_options;
csharrison95f01e922017-04-24 18:52:35577};
578
Daniel Cheng8bb30c62017-10-23 20:40:47579// Operation result when the renderer asks the browser to create a new window.
580enum CreateNewWindowStatus {
Garrett Tanzer6b66a452022-03-02 18:33:42581 // Creation of the new window was blocked, e.g. because the source frame
582 // doesn't have user activation.
583 kBlocked,
584 // Ignore creation of the new window, e.g. because noopener is in effect.
Daniel Cheng8bb30c62017-10-23 20:40:47585 kIgnore,
586 // Reuse the current window rather than creating a new window.
587 kReuse,
588 // Create a new window using the corresponding params in |reply|.
589 kSuccess,
590};
591
592// All routing IDs in this struct must be set to a valid routing ID.
Daniel Cheng4daa51222021-02-21 07:20:11593// TODO(dcheng): It's almost possible to use CreateLocalMainFrameParams here.
594// See if there's a reasonable way to factor out state here by splitting things
595// into browser-created params vs renderer-created params.
csharrison95f01e922017-04-24 18:52:35596struct CreateNewWindowReply {
Daniel Cheng4daa51222021-02-21 07:20:11597 // The unique identifier of the RenderFrameHost
598 blink.mojom.LocalFrameToken main_frame_token;
599
csharrison95f01e922017-04-24 18:52:35600 // The ID of the main frame hosted in the view.
601 int32 main_frame_route_id;
602
danakj0bdfacd2021-01-20 19:27:18603 // The pending mojo connection to the Frame implementation in the renderer.
604 pending_associated_receiver<content.mojom.Frame> frame;
605
Daniel Chengd1b775552021-02-19 18:50:02606 CreateFrameWidgetParams widget_params;
Dave Tapuska8499eec2020-03-16 17:54:30607
Yuzu Saijod46f498a2020-08-04 02:56:22608 // The communication interfaces for the PageBroadcast.
609 pending_associated_receiver<blink.mojom.PageBroadcast> page_broadcast;
610
Ken Rockotc4a0ada92020-12-02 00:22:14611 pending_remote<blink.mojom.BrowserInterfaceBroker>
612 main_frame_interface_broker;
Balazs Engedyba034e72017-10-27 22:26:28613
Dominic Farolino12e06d72022-08-05 02:29:49614 // The `AssociatedInterfaceProvider` that the main `RenderFrameImpl` will use
615 // to request associated interfaces from its corresponding
616 // `RenderFrameHostImpl`.
617 pending_associated_remote<blink.mojom.AssociatedInterfaceProvider>
618 associated_interface_provider;
619
csharrison95f01e922017-04-24 18:52:35620 // Duplicated from CreateNewWindowParams because legacy code.
Daniel Murphy31bbb8b12018-02-07 21:44:10621 string cloned_session_storage_namespace_id;
Pavel Feldman08beed7842017-10-17 19:18:11622
Daniel Cheng4daa51222021-02-21 07:20:11623 // Used for devtools instrumentation and trace-ability. The token is shared
624 // across all frames (local or remotes) representing the same logical frame
625 // tree node, and is used by Blink and content to tag calls and requests for
626 // instrumentation purposes, allowing them to be attributed to a context
627 // frame.
628 //
629 // Must not be used to look up a RenderFrameHostImpl or RenderFrameProxyHost
630 // in the browser process, as the token is shared, making the mapping
631 // ambiguous and non-authoritative.
Oksana Zhuravlova34579e912018-03-23 00:18:49632 mojo_base.mojom.UnguessableToken devtools_main_frame_token;
Yury Semikhatsky82730ff2020-02-25 22:29:26633
634 // Used by devtools instrumentation to tell devtools agent in the renderer
635 // that it should pause created window and wait for an explicit resume command
636 // from the client.
637 bool wait_for_debugger;
Antonio Sartori7f809cc72020-10-30 07:47:20638
639 // The policy container for the new frame that will be created by Blink in
640 // response.
Antonio Sartori9290b6b2020-11-09 10:09:33641 blink.mojom.PolicyContainer policy_container;
csharrison95f01e922017-04-24 18:52:35642};
643
Rakina Zata Amniaf55b5b62022-07-19 23:11:03644// A per-navigation interface passed along with the BeginNavigation call, used
645// to listen to the end of the renderer-initiated navigation cancelation window
646// for that navigation. See comment below for more details.
647interface NavigationRendererCancellationListener {
648 // Called when the navigation cancellation window for a renderer-initiated
649 // navigation ended, as the JS task in which the navigation started had
650 // finished running. Renderer-initiated navigations need to wait for this
651 // message before they can commit, as those navigations can be canceled by
652 // script (e.g. through calling window.stop() or document.open()) that runs
653 // on the same task. See RendererCancellationThrottle for more details.
654 RendererCancellationWindowEnded();
655};
656
csharrison95f01e922017-04-24 18:52:35657// Implemented by the frame server (i.e. the browser process). For messages that
658// must be associated with the IPC channel.
659interface FrameHost {
Daniel Cheng8bb30c62017-10-23 20:40:47660 // Sent by the renderer to request the browser to create a new window. |reply|
661 // is only non-null on when status == CreateNewWindowStatus::kSuccess.
csharrison95f01e922017-04-24 18:52:35662 [Sync] CreateNewWindow(CreateNewWindowParams params)
Daniel Cheng8bb30c62017-10-23 20:40:47663 => (CreateNewWindowStatus status, CreateNewWindowReply? reply);
Yutaka Hiranof7f2f632017-09-06 10:40:08664
Dave Tapuska4e60c232020-11-05 15:49:32665 // Asynchronously creates a child frame. A routing ID must be allocated first
666 // by calling RenderMessageFilter::GenerateFrameRoutingID()
667 // Each of these messages will have a corresponding mojom::FrameHost::Detach
668 // API sent when the frame is detached from the DOM.
669 CreateChildFrame(int32 child_routing_id,
danakj0bdfacd2021-01-20 19:27:18670 pending_associated_remote<content.mojom.Frame> frame,
Dave Tapuska4e60c232020-11-05 15:49:32671 pending_receiver<blink.mojom.BrowserInterfaceBroker>
672 browser_interface_broker,
Antonio Sartoridb967c52021-01-20 09:54:30673 blink.mojom.PolicyContainerBindParams
674 policy_container_bind_params,
Dominic Farolino12e06d72022-08-05 02:29:49675 pending_associated_receiver<blink.mojom.AssociatedInterfaceProvider>
676 associated_interface_provider,
Dave Tapuska4e60c232020-11-05 15:49:32677 blink.mojom.TreeScopeType scope,
678 string frame_name,
679 string frame_unique_name,
680 bool is_created_by_script,
681 blink.mojom.FramePolicy frame_policy,
682 blink.mojom.FrameOwnerProperties frame_owner_properties,
Kevin McNee43fe8292021-10-04 22:59:41683 ChildFrameOwnerElementType child_frame_owner_element_type);
Dave Tapuska4e60c232020-11-05 15:49:32684
Balazs Engedya40712f2017-09-15 15:01:11685 // Sent by the renderer when a navigation commits in the frame.
Oksana Zhuravlova8b88e572019-01-07 21:54:00686
687 // If |interface_params| is non-empty, the FrameHost implementation
Ken Rockot228182e2020-12-01 18:43:59688 // must unbind the old BrowserInterfaceBroker connections, and drop any
689 // interface requests pending on them. Then it should bind the appropriate
690 // requests and start servicing GetInterface messages coming in on these new
691 // connections in a security context that is appropriate for the committed
692 // navigation.
Balazs Engedy0c8d550b2017-12-06 21:30:23693 //
Oksana Zhuravlova8b88e572019-01-07 21:54:00694 // The FrameHost implementation must enforce that |interface_params|
Balazs Engedy0c8d550b2017-12-06 21:30:23695 // is set for cross-document navigations. This prevents origin confusion by
696 // ensuring that interface requests racing with navigation commit will be
697 // either ignored, or serviced correctly in the security context of the
Ken Rockot228182e2020-12-01 18:43:59698 // document they originated from (based on which BrowserInterfaceBroker
699 // connection the GetInterface messages arrive on).
Balazs Engedya40712f2017-09-15 15:01:11700 DidCommitProvisionalLoad(
Balazs Engedy0c8d550b2017-12-06 21:30:23701 DidCommitProvisionalLoadParams params,
Oksana Zhuravlova8b88e572019-01-07 21:54:00702 DidCommitProvisionalLoadInterfaceParams? interface_params);
Arthur Hemery7b67a972017-12-01 15:24:49703
Arthur Hemery7b0ae492018-02-05 16:04:45704 // Sent by the renderer to indicate that a same document navigation
705 // committed in the renderer process.
706 DidCommitSameDocumentNavigation(
Rakina Zata Amni26357782020-12-03 11:45:01707 DidCommitProvisionalLoadParams params,
708 DidCommitSameDocumentNavigationParams same_document_params);
Arthur Hemery7b0ae492018-02-05 16:04:45709
Rakina Zata Amnid09b6112021-06-05 06:20:14710 // Sent by the renderer to indicate that the document input stream has
711 // been updated using document.open() and that the URL for the current
712 // document in the frame should be updated to `url` per step 12 of
713 // https://whatwg.org/C/dynamic-markup-insertion.html#document-open-steps.
714 DidOpenDocumentInputStream(url.mojom.Url url);
715
Arthur Hemery7b67a972017-12-01 15:24:49716 // Sent by the renderer to request a navigation.
Marijn Kruisselbrink07bf59d52018-04-03 21:50:25717 // |blob_url_token| should be non-null when this is a navigation to a blob:
718 // URL. The token will then be used to look up the blob associated with the
719 // blob URL. Without this by the time the navigation code starts fetching
720 // the URL the blob URL might no longer be valid. |blob_url_token| is
721 // not part of BeginNavigationParams because that struct needs to be
722 // cloneable, and thus can't contain mojo interfaces.
723 // If an invalid BlobURLToken is passed in, or if the token doesn't match the
724 // url in |common_params|, the navigation will result in a network error.
Arthur Hemeryd3011f62018-05-30 10:38:44725 // |navigation_client| is passed to the renderer to allow for further control
Nasko Oskovd22f9bf872020-12-23 00:31:35726 // of the navigation. Allows for Commit and Cancels/Aborts.
Antonio Sartoridb967c52021-01-20 09:54:30727 // Passing the |initiator_policy_container_keep_alive_handle| is just a means
728 // to ensure that the PolicyContainerHost of the initiator RenderFrameHost is
729 // kept alive, even if the RenderFrameHost itself has already been deleted in
730 // the meantime. If this can be ensured in other ways, it is safe to pass a
731 // mojo::NullRemote. In particular, if the initiator LocalFrame is alive when
732 // issuing this mojo call, there is no need to pass
733 // |initiator_policy_container_keep_alive_handle|, since the initiator
734 // PolicyContainerHost is kept alive by LocalFrame's PolicyContainer.
Arthur Hemeryd3011f62018-05-30 10:38:44735 // TODO(ahemery): |navigation_client| should not be optional. Make it
Nasko Oskovd22f9bf872020-12-23 00:31:35736 // mandatory.
Rakina Zata Amniaf55b5b62022-07-19 23:11:03737 // |renderer_cancellation_listener| is a per-navigation interface used to
738 // listen to the end of the renderer-initiated navigation cancelation window
739 // for this navigation. See comment for NavigationRendererCancellationListener
740 // for more details.
Arthur Hemery7b67a972017-12-01 15:24:49741 BeginNavigation(
Minggang Wangb9f3fa92021-07-01 15:30:31742 blink.mojom.CommonNavigationParams common_params,
743 blink.mojom.BeginNavigationParams begin_params,
Julie Jeongeun Kim249cfbb2019-08-30 06:44:05744 pending_remote<blink.mojom.BlobURLToken>? blob_url_token,
Julie Jeongeun Kimed2e5ba72019-09-12 10:14:17745 pending_associated_remote<NavigationClient>? navigation_client,
Antonio Sartoridb967c52021-01-20 09:54:30746 pending_remote<blink.mojom.PolicyContainerHostKeepAliveHandle>?
Rakina Zata Amniaf55b5b62022-07-19 23:11:03747 initiator_policy_container_keep_alive_handle,
748 pending_receiver<NavigationRendererCancellationListener>
749 renderer_cancellation_listener);
John Abd-El-Malekd4882642017-12-04 21:45:19750
751 // Sent when a subresource response has started.
Yoshisato Yanagisawa66845bf2022-05-12 04:04:02752 //
753 // |final_response_url| is the final (after all redirects) URL of the
754 // subresource response. The full URL is not available, because in some
755 // cases the path and query may be sanitized away
756 // - see https://crbug.com/973885.
757 //
Jay Civellid5904f02018-03-23 19:43:57758 // |cert_status| is the bitmask of status info of the SSL certificate. (see
759 // net/cert/cert_status_flags.h).
Yoshisato Yanagisawa66845bf2022-05-12 04:04:02760 SubresourceResponseStarted(
761 url.mojom.SchemeHostPort final_response_url,
762 uint32 cert_status);
Jay Civellid5904f02018-03-23 19:43:57763
Jay Civelli116683f2018-03-27 19:56:23764 // Sent when a resource load finished, successfully or not.
Minggang Wangee5af392020-02-05 02:55:28765 ResourceLoadComplete(blink.mojom.ResourceLoadInfo url_load_info);
Luciano Pacheco8def47f2017-12-07 06:52:30766
767 // Sent when the frame changes its window.name.
768 DidChangeName(string name, string unique_name);
769
Austin Tankiang10d64832017-12-20 02:43:55770 // If a cross-process navigation was started for the initial history load in
771 // this subframe, this tries to cancel it to allow a client redirect to happen
772 // instead.
773 CancelInitialHistoryLoad();
774
775 // Change the encoding name of the page in UI when the page has detected
776 // proper encoding name. Sent for top-level frames.
777 UpdateEncoding(string encoding_name);
Lucas Furukawa Gadanie5d27a362018-02-13 14:26:02778
Michael Thiessene5663522022-05-25 21:23:28779 // Updates information to determine whether a user gesture should carryover to
780 // future navigations. This is needed so navigations within a certain
781 // timeframe of a request initiated by a gesture will be treated as if they
782 // were initiated by a gesture too, otherwise the navigation may be blocked.
783 [EnableIf=is_android]
784 UpdateUserGestureCarryoverInfo();
785
Gyuyoung Kimbc7dee642020-06-17 01:43:29786 // Notifies the browser that this frame has new session history information.
Ken Rockot4da6ac02020-10-27 01:28:25787 //
788 // NOTE: PageState can be quite large when serialized, and its message
789 // structure must remain stable; hence [UnlimitedSize] for this message.
790 [UnlimitedSize]
Gyuyoung Kimbc7dee642020-06-17 01:43:29791 UpdateState(PageState state);
Gyuyoung Kim0028790a2020-06-26 00:09:00792
793 // Requests that the given URL be opened in the specified manner.
Yeunjoo Choi9232ea32021-03-08 16:25:17794 OpenURL(blink.mojom.OpenURLParams params);
Gyuyoung Kim847ecc72020-07-21 14:07:55795
796 // Called when the renderer is done loading a frame.
797 DidStopLoading();
ben76f52b242016-06-18 05:42:48798};