ben | 76f52b24 | 2016-06-18 05:42:48 | [diff] [blame] | 1 | // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
| 5 | module content.mojom; |
| 6 | |
Dave Tapuska | fc4adbae | 2020-12-02 22:08:59 | [diff] [blame] | 7 | import "cc/mojom/browser_controls_state.mojom"; |
Arthur Hemery | 9c03573 | 2019-01-07 16:12:41 | [diff] [blame] | 8 | import "content/common/frame_messages.mojom"; |
Jeremy Roman | 62fee22 | 2019-07-09 17:34:14 | [diff] [blame] | 9 | import "content/common/native_types.mojom"; |
Arthur Hemery | d3011f6 | 2018-05-30 10:38:44 | [diff] [blame] | 10 | import "content/common/navigation_client.mojom"; |
Arthur Hemery | 7b67a97 | 2017-12-01 15:24:49 | [diff] [blame] | 11 | import "content/common/navigation_params.mojom"; |
Miyoung Shin | 072d405 | 2020-07-13 07:52:44 | [diff] [blame] | 12 | import "content/common/web_ui.mojom"; |
csharrison | 95f01e92 | 2017-04-24 18:52:35 | [diff] [blame] | 13 | import "content/public/common/window_container_type.mojom"; |
Mario Sanchez Prada | 13bbad5 | 2020-06-01 18:12:29 | [diff] [blame] | 14 | import "mojo/public/mojom/base/file_path.mojom"; |
Ken Rockot | 8b447d7 | 2018-02-03 20:30:47 | [diff] [blame] | 15 | import "mojo/public/mojom/base/string16.mojom"; |
Oksana Zhuravlova | 34579e91 | 2018-03-23 00:18:49 | [diff] [blame] | 16 | import "mojo/public/mojom/base/unguessable_token.mojom"; |
Hajime Hoshi | 35ad74f | 2019-03-07 08:38:05 | [diff] [blame] | 17 | import "mojo/public/mojom/base/values.mojom"; |
arthursonzogni | 42eabe01 | 2020-01-17 15:55:56 | [diff] [blame] | 18 | import "services/network/public/mojom/content_security_policy.mojom"; |
Ken Rockot | 54311e6 | 2018-02-10 19:01:52 | [diff] [blame] | 19 | import "services/network/public/mojom/url_loader.mojom"; |
Kinuko Yasuda | d795ac7 | 2018-07-11 08:07:53 | [diff] [blame] | 20 | import "services/network/public/mojom/url_loader_factory.mojom"; |
arthursonzogni | 42eabe01 | 2020-01-17 15:55:56 | [diff] [blame] | 21 | import "services/network/public/mojom/url_response_head.mojom"; |
Ken Rockot | 543f5e3 | 2018-02-04 02:13:50 | [diff] [blame] | 22 | import "services/service_manager/public/mojom/interface_provider.mojom"; |
Lucas Furukawa Gadani | 7bca98a | 2019-12-11 21:44:25 | [diff] [blame] | 23 | import "services/viz/public/mojom/compositing/frame_sink_id.mojom"; |
Miyoung Shin | 99505dd | 2019-07-27 12:45:35 | [diff] [blame] | 24 | import "services/viz/public/mojom/compositing/surface_id.mojom"; |
Blink Reformat | a30d423 | 2018-04-07 15:31:06 | [diff] [blame] | 25 | import "third_party/blink/public/mojom/blob/blob_url_store.mojom"; |
Dave Tapuska | 4e60c23 | 2020-11-05 15:49:32 | [diff] [blame] | 26 | import "third_party/blink/public/mojom/browser_interface_broker.mojom"; |
Julie Jeongeun Kim | 42a90df | 2019-03-20 23:13:10 | [diff] [blame] | 27 | import "third_party/blink/public/mojom/commit_result/commit_result.mojom"; |
Lowell Manners | f03ea5a | 2019-04-23 11:47:58 | [diff] [blame] | 28 | import "third_party/blink/public/mojom/devtools/console_message.mojom"; |
Kevin McNee | ea7f3b8 | 2020-02-27 21:42:32 | [diff] [blame] | 29 | import "third_party/blink/public/mojom/devtools/devtools_agent.mojom"; |
Gyuyoung Kim | 16a12f5 | 2020-12-19 04:24:26 | [diff] [blame] | 30 | import "third_party/blink/public/mojom/frame/frame.mojom"; |
Dave Tapuska | 4e60c23 | 2020-11-05 15:49:32 | [diff] [blame] | 31 | import "third_party/blink/public/mojom/frame/frame_owner_element_type.mojom"; |
| 32 | import "third_party/blink/public/mojom/frame/frame_owner_properties.mojom"; |
| 33 | import "third_party/blink/public/mojom/frame/frame_policy.mojom"; |
Dave Tapuska | d6703f91 | 2019-01-31 23:13:11 | [diff] [blame] | 34 | import "third_party/blink/public/mojom/frame/lifecycle.mojom"; |
Andy Paicu | c93d3086 | 2018-10-10 15:33:45 | [diff] [blame] | 35 | import "third_party/blink/public/mojom/frame/navigation_initiator.mojom"; |
Antonio Sartori | 7f809cc7 | 2020-10-30 07:47:20 | [diff] [blame] | 36 | import "third_party/blink/public/mojom/frame/policy_container.mojom"; |
Dave Tapuska | 4e60c23 | 2020-11-05 15:49:32 | [diff] [blame] | 37 | import "third_party/blink/public/mojom/frame/tree_scope_type.mojom"; |
Minggang Wang | ee5af39 | 2020-02-05 02:55:28 | [diff] [blame] | 38 | import "third_party/blink/public/mojom/loader/resource_load_info.mojom"; |
Hiroki Nakagawa | 75375834 | 2018-12-27 04:13:49 | [diff] [blame] | 39 | import "third_party/blink/public/mojom/loader/url_loader_factory_bundle.mojom"; |
Yuzu Saijo | aae9170 | 2019-03-13 07:38:05 | [diff] [blame] | 40 | import "third_party/blink/public/mojom/messaging/transferable_message.mojom"; |
Yuzu Saijo | d46f498a | 2020-08-04 02:56:22 | [diff] [blame] | 41 | import "third_party/blink/public/mojom/page/page.mojom"; |
Dave Tapuska | 8499eec | 2020-03-16 17:54:30 | [diff] [blame] | 42 | import "third_party/blink/public/mojom/page/widget.mojom"; |
Lucas Furukawa Gadani | 89a7418 | 2019-01-10 19:33:22 | [diff] [blame] | 43 | import "third_party/blink/public/mojom/portal/portal.mojom"; |
Hiroki Nakagawa | 60693aa | 2020-07-16 09:01:41 | [diff] [blame] | 44 | import "third_party/blink/public/mojom/loader/referrer.mojom"; |
Hiroki Nakagawa | cdbc791 | 2018-11-30 11:30:05 | [diff] [blame] | 45 | import "third_party/blink/public/mojom/service_worker/controller_service_worker.mojom"; |
Hiroki Nakagawa | 077f2096 | 2020-05-15 08:04:44 | [diff] [blame] | 46 | import "third_party/blink/public/mojom/service_worker/service_worker_container.mojom"; |
Chris Hamilton | a46b1544 | 2020-07-31 14:38:56 | [diff] [blame] | 47 | import "third_party/blink/public/mojom/tokens/tokens.mojom"; |
Dave Tapuska | 9a31f41 | 2020-07-20 17:01:28 | [diff] [blame] | 48 | import "third_party/blink/public/mojom/widget/visual_properties.mojom"; |
Julie Jeongeun Kim | 42a90df | 2019-03-20 23:13:10 | [diff] [blame] | 49 | import "third_party/blink/public/mojom/window_features/window_features.mojom"; |
Mario Sanchez Prada | 5d7f1ac | 2020-07-16 17:18:40 | [diff] [blame] | 50 | import "ui/accessibility/mojom/ax_tree_update.mojom"; |
Julie Jeongeun Kim | 2b1d45a | 2019-06-28 23:37:54 | [diff] [blame] | 51 | import "ui/base/mojom/window_open_disposition.mojom"; |
Miyoung Shin | 87943f50 | 2019-07-26 13:31:58 | [diff] [blame] | 52 | import "ui/gfx/geometry/mojom/geometry.mojom"; |
Kevin McNee | ea7f3b8 | 2020-02-27 21:42:32 | [diff] [blame] | 53 | import "url/mojom/origin.mojom"; |
| 54 | import "url/mojom/url.mojom"; |
ben | 76f52b24 | 2016-06-18 05:42:48 | [diff] [blame] | 55 | |
Miyoung Shin | 5d77f7207 | 2020-10-09 15:14:20 | [diff] [blame] | 56 | [Native] |
| 57 | struct PageState; |
| 58 | |
Mario Sanchez Prada | 13bbad5 | 2020-06-01 18:12:29 | [diff] [blame] | 59 | // Provided with each call to Frame::GetSerializedHtmlWithLocalLinks() so that |
| 60 | // the renderer can notify the browser process each time that a chunk of HTML |
| 61 | // data gets serialized, as well as when the entire process is finished. |
| 62 | interface FrameHTMLSerializerHandler { |
| 63 | // Sent by the renderer as a response to GetSerializedHtmlWithLocalLinks() to |
| 64 | // indicate that HTML data has been serialized, included in |data_buffer|. |
| 65 | DidReceiveData(string data_buffer); |
| 66 | |
| 67 | // Reports that the serialization process is finished. It is expected to |
| 68 | // receive this message right after the last time DidReceiveData() is called. |
| 69 | Done(); |
| 70 | }; |
| 71 | |
ben | 76f52b24 | 2016-06-18 05:42:48 | [diff] [blame] | 72 | // Implemented by the frame provider (e.g. renderer processes). |
| 73 | interface Frame { |
Gyuyoung Kim | 6c9ce902 | 2019-11-26 05:40:08 | [diff] [blame] | 74 | GetInterfaceProvider( |
| 75 | pending_receiver<service_manager.mojom.InterfaceProvider> interfaces); |
Daniel Cheng | 118f9e28 | 2017-11-10 03:28:44 | [diff] [blame] | 76 | GetCanonicalUrlForSharing() => (url.mojom.Url? canonical_url); |
Luciano Pacheco | 8528c16f | 2017-12-14 07:10:56 | [diff] [blame] | 77 | |
John Abd-El-Malek | 9405d80e | 2018-08-08 16:50:21 | [diff] [blame] | 78 | // Causes all new subresource requests to be blocked (not being started) until |
| 79 | // ResumeBlockedRequests is called. |
| 80 | BlockRequests(); |
| 81 | |
| 82 | // Resumes blocked requests. |
| 83 | // It is safe to call this without calling BlockRequests. |
| 84 | ResumeBlockedRequests(); |
| 85 | |
Luciano Pacheco | 8528c16f | 2017-12-14 07:10:56 | [diff] [blame] | 86 | // Samsung Galaxy Note-specific "smart clip" stylus text getter. |
| 87 | // Extracts the data at the given rect. |
Eve Martin-Jones | 40f552c | 2018-02-14 22:47:32 | [diff] [blame] | 88 | [EnableIf=is_android] |
Luciano Pacheco | 8528c16f | 2017-12-14 07:10:56 | [diff] [blame] | 89 | ExtractSmartClipData(gfx.mojom.Rect rect) |
Mahesh Machavolu | 346cd266 | 2018-05-24 12:40:11 | [diff] [blame] | 90 | => (mojo_base.mojom.String16 text, mojo_base.mojom.String16 html, |
| 91 | gfx.mojom.Rect clip_rect); |
Scott Violet | 0de3837c | 2019-09-06 22:51:54 | [diff] [blame] | 92 | |
Mario Sanchez Prada | 749007a | 2020-03-13 16:48:29 | [diff] [blame] | 93 | // Requests a one-time snapshot of the accessibility tree without enabling |
| 94 | // accessibility if it wasn't already enabled. |
| 95 | // See ui/accessibility/ax_mode.h for valid values of |ax_mode|. |
Ken Rockot | 4da6ac0 | 2020-10-27 01:28:25 | [diff] [blame] | 96 | // |
| 97 | // TODO(crbug.com/1141990): AXTreeUpdate can be quite large, hence the |
| 98 | // [UnlimitedSize] tag. It may be possible to remove this if AXTreeUpdate |
| 99 | // can be reworked to avoid very large serialized values. |
Mario Sanchez Prada | 749007a | 2020-03-13 16:48:29 | [diff] [blame] | 100 | SnapshotAccessibilityTree(uint32 ax_mode) |
Mario Sanchez Prada | 5d7f1ac | 2020-07-16 17:18:40 | [diff] [blame] | 101 | => (ax.mojom.AXTreeUpdate snapshot); |
Mario Sanchez Prada | 13bbad5 | 2020-06-01 18:12:29 | [diff] [blame] | 102 | |
| 103 | // Get HTML data by serializing the target frame and replacing all resource |
| 104 | // links with a path to the local copy passed in the message payload. In order |
| 105 | // to report progress to the the browser process, a pending remote is passed |
| 106 | // via |callback_remote|, so that direct communication with the SavePackage |
| 107 | // object that initiated the process can be established. |
| 108 | GetSerializedHtmlWithLocalLinks( |
| 109 | map<url.mojom.Url, mojo_base.mojom.FilePath> url_map, |
| 110 | map<mojo_base.mojom.UnguessableToken, mojo_base.mojom.FilePath> |
| 111 | frame_token_map, bool save_with_empty_url, |
| 112 | pending_remote<FrameHTMLSerializerHandler> handler_remote); |
ben | 76f52b24 | 2016-06-18 05:42:48 | [diff] [blame] | 113 | }; |
| 114 | |
Ken Rockot | 4878545 | 2017-10-25 19:33:14 | [diff] [blame] | 115 | // Implemented by the frame provider and currently must be associated with the |
| 116 | // legacy IPC channel. |
Arthur Hemery | d3011f6 | 2018-05-30 10:38:44 | [diff] [blame] | 117 | // KEEP THE COMMIT FUNCTIONS IN SYNC in content/common/navigation_client.mojom. |
| 118 | // These will eventually be removed from FrameNavigationControl. |
Ken Rockot | 4878545 | 2017-10-25 19:33:14 | [diff] [blame] | 119 | interface FrameNavigationControl { |
clamy | af4bf2d9 | 2018-02-06 10:54:36 | [diff] [blame] | 120 | // Tells the renderer that a same-document navigation should be committed. |
| 121 | // The renderer will return a status value indicating whether the commit |
| 122 | // could proceed as expected or not. In particular, it might be necessary to |
| 123 | // restart the navigation if it is no-longer same-document, which can happen |
| 124 | // if the renderer committed another navigation in the meantime. |
| 125 | CommitSameDocumentNavigation( |
| 126 | CommonNavigationParams common_params, |
Nasko Oskov | c36327d | 2019-01-03 23:23:04 | [diff] [blame] | 127 | CommitNavigationParams request_params) |
clamy | af4bf2d9 | 2018-02-06 10:54:36 | [diff] [blame] | 128 | => (blink.mojom.CommitResult commit_result); |
| 129 | |
clamy | b1df7b96 | 2018-02-01 17:38:17 | [diff] [blame] | 130 | // Asks the renderer to handle a renderer-debug URL. |
| 131 | HandleRendererDebugURL(url.mojom.Url url); |
| 132 | |
Chong Zhang | 7306b0b | 2018-01-24 05:59:24 | [diff] [blame] | 133 | // Provides the renderer an updated |subresource_loader_factories|. |
| 134 | // |
| 135 | // This method is intended to fix broken loaders after a Network Service |
| 136 | // crash, and is only used when Network Service is enabled. |
| 137 | // |
| 138 | // The new bundle contains replacement factories for a subset of the |
| 139 | // receiver's existing bundle. |
| 140 | UpdateSubresourceLoaderFactories( |
Hiroki Nakagawa | 75375834 | 2018-12-27 04:13:49 | [diff] [blame] | 141 | blink.mojom.URLLoaderFactoryBundle subresource_loader_factories); |
Dmitry Gozman | 6adf95b | 2018-10-10 22:12:19 | [diff] [blame] | 142 | |
| 143 | // Returns a DevToolsAgent interface for this frame, used for |
| 144 | // remote debugging. See DevToolsAgent for details. |
| 145 | // Returned DevToolsAgent must be associated with navigation control, |
| 146 | // due to various ordering dependencies between DevTools protocol and |
| 147 | // navigation. |
Julie Jeongeun Kim | 0788779 | 2019-08-13 11:05:48 | [diff] [blame] | 148 | BindDevToolsAgent( |
| 149 | pending_associated_remote<blink.mojom.DevToolsAgentHost> agent_host, |
Andrey Kosyakov | 5bb020f | 2020-03-19 17:28:19 | [diff] [blame] | 150 | pending_associated_receiver<blink.mojom.DevToolsAgent> agent); |
Hajime Hoshi | 35ad74f | 2019-03-07 08:38:05 | [diff] [blame] | 151 | |
Maksim Sadym | cfb8f8d | 2020-09-30 20:30:45 | [diff] [blame] | 152 | // Request for the renderer to execute a given JavaScript method on a given |
| 153 | // object (both identified by name) in the frame's context. |
| 154 | // |
| 155 | // |object_name| is the global name of the object. |
| 156 | // |
| 157 | // |method_name| is the name of the method on the object. |
| 158 | // |
| 159 | // |arguments| is the list of arguments to pass to the method invocation. |
| 160 | // |
| 161 | // |wants_result| is true if the result of this execution is required by the |
| 162 | // caller. If it is false, a reply is still required by Mojo, but a null value |
| 163 | // should be returned to avoid issues serializing a large, unwanted reply. |
| 164 | JavaScriptMethodExecuteRequest( |
| 165 | mojo_base.mojom.String16 object_name, |
| 166 | mojo_base.mojom.String16 method_name, |
| 167 | mojo_base.mojom.ListValue arguments, |
| 168 | bool wants_result) => (mojo_base.mojom.Value result); |
| 169 | |
Hajime Hoshi | 35ad74f | 2019-03-07 08:38:05 | [diff] [blame] | 170 | // Request for the renderer to execute JavaScript in the frame's context. |
| 171 | // |
| 172 | // |javascript| is the string containing the JavaScript to be executed in the |
Avi Drissman | 90630d9 | 2020-04-29 21:17:36 | [diff] [blame] | 173 | // target frame's context. Note that this uses BigString16 rather than |
| 174 | // String16 as this is used in contexts, like DevTools, where the contents of |
| 175 | // the JavaScript script is user-provided, and therefore we can't guarantee |
| 176 | // the size of the script. |
Hajime Hoshi | 35ad74f | 2019-03-07 08:38:05 | [diff] [blame] | 177 | // |
Avi Drissman | 8e3ebe9 | 2019-06-10 20:26:11 | [diff] [blame] | 178 | // |wants_result| is true if the result of this execution is required by the |
| 179 | // caller. If it is false, a reply is still required by Mojo, but a null value |
| 180 | // should be returned to avoid issues serializing a large, unwanted reply. |
| 181 | // |
Hajime Hoshi | 35ad74f | 2019-03-07 08:38:05 | [diff] [blame] | 182 | // TODO(hajimehoshi): This requires navigate association to keep the message |
| 183 | // order with other navigation-related messages. Fix this and move this to a |
| 184 | // non-navigate-related interface if possible. |
Avi Drissman | 4544828f | 2019-03-11 20:37:32 | [diff] [blame] | 185 | JavaScriptExecuteRequest( |
Avi Drissman | 90630d9 | 2020-04-29 21:17:36 | [diff] [blame] | 186 | mojo_base.mojom.BigString16 javascript, |
Avi Drissman | 8e3ebe9 | 2019-06-10 20:26:11 | [diff] [blame] | 187 | bool wants_result) => (mojo_base.mojom.Value result); |
Hajime Hoshi | 35ad74f | 2019-03-07 08:38:05 | [diff] [blame] | 188 | |
Mustaq Ahmed | 02cd883 | 2019-12-05 15:46:56 | [diff] [blame] | 189 | // ONLY FOR TESTS: Same as above but this can optionally trigger a fake user |
| 190 | // activation notification to test functionalities that are gated by user |
| 191 | // activation. |
Avi Drissman | 4544828f | 2019-03-11 20:37:32 | [diff] [blame] | 192 | JavaScriptExecuteRequestForTests( |
Avi Drissman | 90630d9 | 2020-04-29 21:17:36 | [diff] [blame] | 193 | mojo_base.mojom.BigString16 javascript, |
Avi Drissman | 8e3ebe9 | 2019-06-10 20:26:11 | [diff] [blame] | 194 | bool wants_result, |
Hajime Hoshi | f85e7cf72 | 2019-07-19 00:54:49 | [diff] [blame] | 195 | bool has_user_gesture, |
| 196 | int32 world_id) |
Avi Drissman | 4544828f | 2019-03-11 20:37:32 | [diff] [blame] | 197 | => (mojo_base.mojom.Value result); |
Hajime Hoshi | 35ad74f | 2019-03-07 08:38:05 | [diff] [blame] | 198 | |
| 199 | // Same as JavaScriptExecuteRequest above except the script is run in the |
| 200 | // isolated world specified by the fourth parameter. |
Avi Drissman | 4544828f | 2019-03-11 20:37:32 | [diff] [blame] | 201 | JavaScriptExecuteRequestInIsolatedWorld( |
Avi Drissman | 90630d9 | 2020-04-29 21:17:36 | [diff] [blame] | 202 | mojo_base.mojom.BigString16 javascript, |
Avi Drissman | 8e3ebe9 | 2019-06-10 20:26:11 | [diff] [blame] | 203 | bool wants_result, |
Avi Drissman | 4544828f | 2019-03-11 20:37:32 | [diff] [blame] | 204 | int32 world_id) => (mojo_base.mojom.Value result); |
Yuzu Saijo | aae9170 | 2019-03-13 07:38:05 | [diff] [blame] | 205 | |
Ian Barkley-Yeung | bda77fb | 2020-12-08 04:26:46 | [diff] [blame] | 206 | // Indicates that the frame host (browser) wants the |untrusted_stack_trace| |
| 207 | // parameter of DidAddMessageToConsole() filled in for Error messages if at |
| 208 | // all possible. |
| 209 | SetWantErrorMessageStackTrace(); |
| 210 | |
Gyuyoung Kim | 11aad0b6 | 2020-04-29 16:00:26 | [diff] [blame] | 211 | // Requests that a provisional RenderFrame swap itself into the frame tree, |
| 212 | // replacing the RenderFrameProxy that it is associated with. This is used |
| 213 | // with remote-to-local frame navigations when the RenderFrameProxy |
| 214 | // corresponds to a non-live (crashed) frame. In that case, the browser |
| 215 | // process will send this message as part of an early commit to stop showing |
| 216 | // the sad iframe without waiting for the provisional RenderFrame's navigation |
| 217 | // to commit. |
| 218 | SwapIn(); |
Ken Rockot | 4878545 | 2017-10-25 19:33:14 | [diff] [blame] | 219 | }; |
| 220 | |
sammc | 7f6c6a0 | 2017-01-30 00:53:51 | [diff] [blame] | 221 | // Implemented by the frame (e.g. renderer processes). |
| 222 | // Instances of this interface must be associated with (i.e., FIFO with) the |
| 223 | // legacy IPC channel. |
| 224 | interface FrameBindingsControl { |
| 225 | // Used to tell a render frame whether it should expose various bindings |
| 226 | // that allow JS content extended privileges. See BindingsPolicy for valid |
| 227 | // flag values. |
| 228 | AllowBindings(int32 enabled_bindings_flags); |
Nasko Oskov | 8a73f7d | 2019-09-27 22:29:32 | [diff] [blame] | 229 | |
| 230 | // Used to tell the RenderFrame to enable Mojo JS bindings, which allows |
| 231 | // JS code running in the renderer process to connect to Mojo interfaces |
| 232 | // and make method calls on them. |
| 233 | // This is used for WebUI only at this time. |
| 234 | EnableMojoJsBindings(); |
Miyoung Shin | 072d405 | 2020-07-13 07:52:44 | [diff] [blame] | 235 | |
| 236 | // Used to bind WebUI and WebUIHost mojo connections. |
Daniel Cheng | 4b931a4f | 2020-12-18 01:59:35 | [diff] [blame] | 237 | BindWebUI(pending_associated_receiver<content.mojom.WebUI> receiver, |
| 238 | pending_associated_remote<content.mojom.WebUIHost> remote); |
sammc | 7f6c6a0 | 2017-01-30 00:53:51 | [diff] [blame] | 239 | }; |
| 240 | |
ben | 76f52b24 | 2016-06-18 05:42:48 | [diff] [blame] | 241 | // Implemented by a service that provides implementations of the Frame |
| 242 | // interface. (e.g. renderer processes). |
| 243 | interface FrameFactory { |
Henrique Ferreiro | 3a9751c | 2019-09-30 13:54:07 | [diff] [blame] | 244 | CreateFrame(int32 frame_routing_id, pending_receiver<Frame> frame); |
csharrison | 95f01e92 | 2017-04-24 18:52:35 | [diff] [blame] | 245 | }; |
| 246 | |
csharrison | 95f01e92 | 2017-04-24 18:52:35 | [diff] [blame] | 247 | struct CreateNewWindowParams { |
Mustaq Ahmed | 8601a56 | 2020-01-31 18:05:52 | [diff] [blame] | 248 | // True if ContentRendererClient allows popups. This is the case only for |
| 249 | // extensions. |
| 250 | bool allow_popup; |
csharrison | 95f01e92 | 2017-04-24 18:52:35 | [diff] [blame] | 251 | |
| 252 | // Type of window requested. |
| 253 | WindowContainerType window_container_type; |
| 254 | |
| 255 | // The session storage namespace ID this window should use. |
Daniel Murphy | 31bbb8b1 | 2018-02-07 21:44:10 | [diff] [blame] | 256 | string session_storage_namespace_id; |
csharrison | 95f01e92 | 2017-04-24 18:52:35 | [diff] [blame] | 257 | |
Daniel Murphy | e3eec92c | 2018-02-23 19:09:15 | [diff] [blame] | 258 | // The session storage namespace ID this window should clone from. |
| 259 | // TODO(dmurph): Remove this once session storage is fully mojo'd, as the |
| 260 | // clone call happens on a different interface. https://crbug.com/716490 |
| 261 | string clone_from_session_storage_namespace_id; |
| 262 | |
csharrison | 95f01e92 | 2017-04-24 18:52:35 | [diff] [blame] | 263 | // The name of the resulting frame that should be created (empty if none |
| 264 | // has been specified). UTF8 encoded string. |
| 265 | string frame_name; |
| 266 | |
csharrison | 95f01e92 | 2017-04-24 18:52:35 | [diff] [blame] | 267 | // Whether the opener will be suppressed in the new window, in which case |
| 268 | // scripting the new window is not allowed. |
| 269 | bool opener_suppressed; |
| 270 | |
| 271 | // Whether the window should be opened in the foreground, background, etc. |
| 272 | ui.mojom.WindowOpenDisposition disposition; |
| 273 | |
| 274 | // The URL that will be loaded in the new window (empty if none has been |
| 275 | // specified). |
| 276 | url.mojom.Url target_url; |
| 277 | |
| 278 | // The referrer that will be used to load |target_url| (empty if none has |
| 279 | // been specified). |
| 280 | blink.mojom.Referrer referrer; |
| 281 | |
| 282 | // The window features to use for the new window. |
| 283 | blink.mojom.WindowFeatures features; |
John Delaney | 8623c64 | 2021-01-06 17:37:07 | [diff] [blame^] | 284 | |
| 285 | // The impression associated with the navigation in the new window, if |
| 286 | // one is specified. |
| 287 | Impression? impression; |
csharrison | 95f01e92 | 2017-04-24 18:52:35 | [diff] [blame] | 288 | }; |
| 289 | |
Daniel Cheng | 8bb30c6 | 2017-10-23 20:40:47 | [diff] [blame] | 290 | // Operation result when the renderer asks the browser to create a new window. |
| 291 | enum CreateNewWindowStatus { |
| 292 | // Ignore creation of the new window. This can happen because creation is |
| 293 | // blocked or because the new window should have no opener relationship. |
| 294 | kIgnore, |
| 295 | // Reuse the current window rather than creating a new window. |
| 296 | kReuse, |
| 297 | // Create a new window using the corresponding params in |reply|. |
| 298 | kSuccess, |
| 299 | }; |
| 300 | |
| 301 | // All routing IDs in this struct must be set to a valid routing ID. |
csharrison | 95f01e92 | 2017-04-24 18:52:35 | [diff] [blame] | 302 | struct CreateNewWindowReply { |
Daniel Cheng | 8bb30c6 | 2017-10-23 20:40:47 | [diff] [blame] | 303 | // The ID of the view to be created. |
csharrison | 95f01e92 | 2017-04-24 18:52:35 | [diff] [blame] | 304 | int32 route_id; |
| 305 | |
| 306 | // The ID of the main frame hosted in the view. |
| 307 | int32 main_frame_route_id; |
| 308 | |
Dave Tapuska | 8444938 | 2020-05-01 00:39:04 | [diff] [blame] | 309 | // The unique identifier of the RenderFrameHost |
| 310 | mojo_base.mojom.UnguessableToken main_frame_frame_token; |
| 311 | |
csharrison | 95f01e92 | 2017-04-24 18:52:35 | [diff] [blame] | 312 | // The ID of the widget for the main frame. |
| 313 | int32 main_frame_widget_route_id; |
| 314 | |
danakj | be56b813 | 2019-10-12 00:57:41 | [diff] [blame] | 315 | // Initial properties for the main frame RenderWidget. |
Dave Tapuska | 9a31f41 | 2020-07-20 17:01:28 | [diff] [blame] | 316 | blink.mojom.VisualProperties visual_properties; |
danakj | be56b813 | 2019-10-12 00:57:41 | [diff] [blame] | 317 | |
Dave Tapuska | 8499eec | 2020-03-16 17:54:30 | [diff] [blame] | 318 | // The communication interfaces for the WebFrameWidget in blink. |
| 319 | pending_associated_remote<blink.mojom.FrameWidgetHost> frame_widget_host; |
| 320 | pending_associated_receiver<blink.mojom.FrameWidget> frame_widget; |
| 321 | pending_associated_remote<blink.mojom.WidgetHost> widget_host; |
| 322 | pending_associated_receiver<blink.mojom.Widget> widget; |
| 323 | |
Yuzu Saijo | d46f498a | 2020-08-04 02:56:22 | [diff] [blame] | 324 | // The communication interfaces for the PageBroadcast. |
| 325 | pending_associated_receiver<blink.mojom.PageBroadcast> page_broadcast; |
| 326 | |
Ken Rockot | c4a0ada9 | 2020-12-02 00:22:14 | [diff] [blame] | 327 | pending_remote<blink.mojom.BrowserInterfaceBroker> |
| 328 | main_frame_interface_broker; |
Balazs Engedy | ba034e7 | 2017-10-27 22:26:28 | [diff] [blame] | 329 | |
csharrison | 95f01e92 | 2017-04-24 18:52:35 | [diff] [blame] | 330 | // Duplicated from CreateNewWindowParams because legacy code. |
Daniel Murphy | 31bbb8b1 | 2018-02-07 21:44:10 | [diff] [blame] | 331 | string cloned_session_storage_namespace_id; |
Pavel Feldman | 08beed784 | 2017-10-17 19:18:11 | [diff] [blame] | 332 | |
| 333 | // Used for devtools instrumentation and trace-ability. The token is |
| 334 | // propagated to Blink's LocalFrame and both Blink and content/ |
| 335 | // can tag calls and requests with this instrumentation token in order to |
| 336 | // attribute them to the context frame. |
| 337 | // |devtools_frame_token| is only defined by the browser and is never |
| 338 | // sent back from the renderer in the control calls. |
Oksana Zhuravlova | 34579e91 | 2018-03-23 00:18:49 | [diff] [blame] | 339 | mojo_base.mojom.UnguessableToken devtools_main_frame_token; |
Yury Semikhatsky | 82730ff | 2020-02-25 22:29:26 | [diff] [blame] | 340 | |
| 341 | // Used by devtools instrumentation to tell devtools agent in the renderer |
| 342 | // that it should pause created window and wait for an explicit resume command |
| 343 | // from the client. |
| 344 | bool wait_for_debugger; |
Antonio Sartori | 7f809cc7 | 2020-10-30 07:47:20 | [diff] [blame] | 345 | |
| 346 | // The policy container for the new frame that will be created by Blink in |
| 347 | // response. |
Antonio Sartori | 9290b6b | 2020-11-09 10:09:33 | [diff] [blame] | 348 | blink.mojom.PolicyContainer policy_container; |
csharrison | 95f01e92 | 2017-04-24 18:52:35 | [diff] [blame] | 349 | }; |
| 350 | |
Gyuyoung Kim | 0028790a | 2020-06-26 00:09:00 | [diff] [blame] | 351 | // This struct holds parameters included in the OpenURL method sent by the |
| 352 | // renderer to the browser, |is_history_navigation_in_new_child_frame| is true |
| 353 | // in the case that the browser process should look for an existing history item |
| 354 | // for the frame. |
| 355 | struct OpenURLParams { |
| 356 | // The main URL to open. |
| 357 | url.mojom.Url url; |
| 358 | url.mojom.Origin initiator_origin; |
Antonio Sartori | 9a82f6f3 | 2020-12-14 09:22:45 | [diff] [blame] | 359 | |
| 360 | // The token of the RenderFrameHost that initiated the navigation. It might |
| 361 | // refer to a RenderFrameHost that doesn't exist anymore when the IPC reaches |
| 362 | // the browser process. |
| 363 | mojo_base.mojom.UnguessableToken? initiator_frame_token; |
| 364 | |
Gyuyoung Kim | 0028790a | 2020-06-26 00:09:00 | [diff] [blame] | 365 | network.mojom.URLRequestBody? post_body; |
| 366 | string extra_headers; |
| 367 | blink.mojom.Referrer referrer; |
| 368 | |
| 369 | // The window position to open the URL. |
| 370 | ui.mojom.WindowOpenDisposition disposition; |
| 371 | bool should_replace_current_entry; |
| 372 | bool user_gesture; |
| 373 | |
| 374 | // Extra information about the triggering of the OpenURL. |
Gyuyoung Kim | 16a12f5 | 2020-12-19 04:24:26 | [diff] [blame] | 375 | blink.mojom.TriggeringEventInfo triggering_event_info; |
Daniel Cheng | 13251e5 | 2020-11-25 17:41:23 | [diff] [blame] | 376 | pending_remote<blink.mojom.BlobURLToken>? blob_url_token; |
Gyuyoung Kim | 0028790a | 2020-06-26 00:09:00 | [diff] [blame] | 377 | string href_translate; |
| 378 | Impression? impression; |
| 379 | NavigationDownloadPolicy download_policy; |
| 380 | }; |
| 381 | |
csharrison | 95f01e92 | 2017-04-24 18:52:35 | [diff] [blame] | 382 | // Implemented by the frame server (i.e. the browser process). For messages that |
| 383 | // must be associated with the IPC channel. |
| 384 | interface FrameHost { |
Daniel Cheng | 8bb30c6 | 2017-10-23 20:40:47 | [diff] [blame] | 385 | // Sent by the renderer to request the browser to create a new window. |reply| |
| 386 | // is only non-null on when status == CreateNewWindowStatus::kSuccess. |
csharrison | 95f01e92 | 2017-04-24 18:52:35 | [diff] [blame] | 387 | [Sync] CreateNewWindow(CreateNewWindowParams params) |
Daniel Cheng | 8bb30c6 | 2017-10-23 20:40:47 | [diff] [blame] | 388 | => (CreateNewWindowStatus status, CreateNewWindowReply? reply); |
Yutaka Hirano | f7f2f63 | 2017-09-06 10:40:08 | [diff] [blame] | 389 | |
Lucas Furukawa Gadani | 9912582 | 2019-01-03 15:41:49 | [diff] [blame] | 390 | // Sent by the renderer process to request the creation of a new portal. |
Adithya Srinivasan | e8bf80e | 2019-05-01 15:39:31 | [diff] [blame] | 391 | // |portal| is the pipe to be used for the Portal object, |client| is the pipe |
Dave Tapuska | 8444938 | 2020-05-01 00:39:04 | [diff] [blame] | 392 | // used to communicate back with the caller. Returns: |
| 393 | // |proxy_routing_id| - the routing id of the RenderFrameProxy |
| 394 | // |initial_replicated_state| - the replicated state associated with that |
| 395 | // RenderFrameProxy |
| 396 | // |portal_token| - the unique identifier for the portal |
| 397 | // |frame_token| - the unique identifier of the RenderFrameProxy |
| 398 | // |devtools_frame_token| - the unique identifier of the frame node in the |
| 399 | // frame tree |
Jeremy Roman | d92e137 | 2019-06-04 16:31:17 | [diff] [blame] | 400 | [Sync] CreatePortal( |
| 401 | pending_associated_receiver<blink.mojom.Portal> portal, |
| 402 | pending_associated_remote<blink.mojom.PortalClient> client) |
Lucas Furukawa Gadani | 9912582 | 2019-01-03 15:41:49 | [diff] [blame] | 403 | => (int32 proxy_routing_id, |
Kevin McNee | 51ef5dc | 2020-01-13 17:52:37 | [diff] [blame] | 404 | FrameReplicationState initial_replicated_state, |
Adithya Srinivasan | ea4760c | 2020-07-30 15:44:57 | [diff] [blame] | 405 | blink.mojom.PortalToken portal_token, |
Dave Tapuska | 8444938 | 2020-05-01 00:39:04 | [diff] [blame] | 406 | mojo_base.mojom.UnguessableToken frame_token, |
Lucas Furukawa Gadani | f68204d | 2019-04-30 17:30:24 | [diff] [blame] | 407 | mojo_base.mojom.UnguessableToken devtools_frame_token); |
Lucas Furukawa Gadani | 9912582 | 2019-01-03 15:41:49 | [diff] [blame] | 408 | |
Lucas Furukawa Gadani | 56dd545 | 2019-03-22 18:23:12 | [diff] [blame] | 409 | // Requests that this frame adopts the portal identified by |portal_token|. |
Dave Tapuska | 8444938 | 2020-05-01 00:39:04 | [diff] [blame] | 410 | // Returns: |
| 411 | // |proxy_routing_id| - the routing id of the portal's RenderFrameProxy |
| 412 | // |replicated_state| - the replicated state associated with that |
| 413 | // RenderFrameProxy |
| 414 | // |frame_token| - the unique identifier of the RenderFrameProxy |
| 415 | // |devtools_frame_token| - the unique identifier of the frame node in the |
| 416 | // frame tree |
Adithya Srinivasan | ea4760c | 2020-07-30 15:44:57 | [diff] [blame] | 417 | [Sync] AdoptPortal(blink.mojom.PortalToken portal_token) |
Lucas Furukawa Gadani | f68204d | 2019-04-30 17:30:24 | [diff] [blame] | 418 | => (int32 proxy_routing_id, |
Lucas Furukawa Gadani | 7bca98a | 2019-12-11 21:44:25 | [diff] [blame] | 419 | viz.mojom.FrameSinkId frame_sink_id, |
Jeremy Roman | 62fee22 | 2019-07-09 17:34:14 | [diff] [blame] | 420 | FrameReplicationState replicated_state, |
Dave Tapuska | 8444938 | 2020-05-01 00:39:04 | [diff] [blame] | 421 | mojo_base.mojom.UnguessableToken frame_token, |
Lucas Furukawa Gadani | f68204d | 2019-04-30 17:30:24 | [diff] [blame] | 422 | mojo_base.mojom.UnguessableToken devtools_frame_token); |
Lucas Furukawa Gadani | 56dd545 | 2019-03-22 18:23:12 | [diff] [blame] | 423 | |
Dave Tapuska | d983562 | 2020-03-10 17:32:31 | [diff] [blame] | 424 | |
| 425 | // Similar to CreateNewWindow, except used for sub-widgets, like <select> |
Dave Tapuska | 04ccda06 | 2020-10-21 21:58:12 | [diff] [blame] | 426 | // dropdowns. Upon return, the renderer side popup will be owned by the |
| 427 | // PopupWidgetHost. |
Dave Tapuska | d95cfb3 | 2020-11-02 17:04:55 | [diff] [blame] | 428 | CreateNewPopupWidget( |
Dave Tapuska | 04ccda06 | 2020-10-21 21:58:12 | [diff] [blame] | 429 | pending_associated_receiver<blink.mojom.PopupWidgetHost> popup_host, |
Dave Tapuska | 8499eec | 2020-03-16 17:54:30 | [diff] [blame] | 430 | pending_associated_receiver<blink.mojom.WidgetHost> blink_widget_host, |
Dave Tapuska | d95cfb3 | 2020-11-02 17:04:55 | [diff] [blame] | 431 | pending_associated_remote<blink.mojom.Widget> blink_widget); |
Dave Tapuska | d983562 | 2020-03-10 17:32:31 | [diff] [blame] | 432 | |
Dave Tapuska | 4e60c23 | 2020-11-05 15:49:32 | [diff] [blame] | 433 | // Asynchronously creates a child frame. A routing ID must be allocated first |
| 434 | // by calling RenderMessageFilter::GenerateFrameRoutingID() |
| 435 | // Each of these messages will have a corresponding mojom::FrameHost::Detach |
| 436 | // API sent when the frame is detached from the DOM. |
| 437 | CreateChildFrame(int32 child_routing_id, |
Dave Tapuska | 4e60c23 | 2020-11-05 15:49:32 | [diff] [blame] | 438 | pending_receiver<blink.mojom.BrowserInterfaceBroker> |
| 439 | browser_interface_broker, |
Antonio Sartori | a1fd143 | 2020-11-25 09:10:20 | [diff] [blame] | 440 | pending_associated_receiver<blink.mojom.PolicyContainerHost> |
| 441 | policy_container_associated_receiver, |
Dave Tapuska | 4e60c23 | 2020-11-05 15:49:32 | [diff] [blame] | 442 | blink.mojom.TreeScopeType scope, |
| 443 | string frame_name, |
| 444 | string frame_unique_name, |
| 445 | bool is_created_by_script, |
| 446 | blink.mojom.FramePolicy frame_policy, |
| 447 | blink.mojom.FrameOwnerProperties frame_owner_properties, |
| 448 | blink.mojom.FrameOwnerElementType frame_owner_element_type); |
| 449 | |
Balazs Engedy | a40712f | 2017-09-15 15:01:11 | [diff] [blame] | 450 | // Sent by the renderer when a navigation commits in the frame. |
Oksana Zhuravlova | 8b88e57 | 2019-01-07 21:54:00 | [diff] [blame] | 451 | |
| 452 | // If |interface_params| is non-empty, the FrameHost implementation |
Ken Rockot | 228182e | 2020-12-01 18:43:59 | [diff] [blame] | 453 | // must unbind the old BrowserInterfaceBroker connections, and drop any |
| 454 | // interface requests pending on them. Then it should bind the appropriate |
| 455 | // requests and start servicing GetInterface messages coming in on these new |
| 456 | // connections in a security context that is appropriate for the committed |
| 457 | // navigation. |
Balazs Engedy | 0c8d550b | 2017-12-06 21:30:23 | [diff] [blame] | 458 | // |
Oksana Zhuravlova | 8b88e57 | 2019-01-07 21:54:00 | [diff] [blame] | 459 | // The FrameHost implementation must enforce that |interface_params| |
Balazs Engedy | 0c8d550b | 2017-12-06 21:30:23 | [diff] [blame] | 460 | // is set for cross-document navigations. This prevents origin confusion by |
| 461 | // ensuring that interface requests racing with navigation commit will be |
| 462 | // either ignored, or serviced correctly in the security context of the |
Ken Rockot | 228182e | 2020-12-01 18:43:59 | [diff] [blame] | 463 | // document they originated from (based on which BrowserInterfaceBroker |
| 464 | // connection the GetInterface messages arrive on). |
Balazs Engedy | a40712f | 2017-09-15 15:01:11 | [diff] [blame] | 465 | DidCommitProvisionalLoad( |
Balazs Engedy | 0c8d550b | 2017-12-06 21:30:23 | [diff] [blame] | 466 | DidCommitProvisionalLoadParams params, |
Oksana Zhuravlova | 8b88e57 | 2019-01-07 21:54:00 | [diff] [blame] | 467 | DidCommitProvisionalLoadInterfaceParams? interface_params); |
Arthur Hemery | 7b67a97 | 2017-12-01 15:24:49 | [diff] [blame] | 468 | |
Arthur Hemery | 7b0ae49 | 2018-02-05 16:04:45 | [diff] [blame] | 469 | // Sent by the renderer to indicate that a same document navigation |
| 470 | // committed in the renderer process. |
| 471 | DidCommitSameDocumentNavigation( |
Rakina Zata Amni | 2635778 | 2020-12-03 11:45:01 | [diff] [blame] | 472 | DidCommitProvisionalLoadParams params, |
| 473 | DidCommitSameDocumentNavigationParams same_document_params); |
Arthur Hemery | 7b0ae49 | 2018-02-05 16:04:45 | [diff] [blame] | 474 | |
Arthur Hemery | 7b67a97 | 2017-12-01 15:24:49 | [diff] [blame] | 475 | // Sent by the renderer to request a navigation. |
Marijn Kruisselbrink | 07bf59d5 | 2018-04-03 21:50:25 | [diff] [blame] | 476 | // |blob_url_token| should be non-null when this is a navigation to a blob: |
| 477 | // URL. The token will then be used to look up the blob associated with the |
| 478 | // blob URL. Without this by the time the navigation code starts fetching |
| 479 | // the URL the blob URL might no longer be valid. |blob_url_token| is |
| 480 | // not part of BeginNavigationParams because that struct needs to be |
| 481 | // cloneable, and thus can't contain mojo interfaces. |
| 482 | // If an invalid BlobURLToken is passed in, or if the token doesn't match the |
| 483 | // url in |common_params|, the navigation will result in a network error. |
Arthur Hemery | d3011f6 | 2018-05-30 10:38:44 | [diff] [blame] | 484 | // |navigation_client| is passed to the renderer to allow for further control |
Nasko Oskov | d22f9bf87 | 2020-12-23 00:31:35 | [diff] [blame] | 485 | // of the navigation. Allows for Commit and Cancels/Aborts. |
Arthur Hemery | d3011f6 | 2018-05-30 10:38:44 | [diff] [blame] | 486 | // TODO(ahemery): |navigation_client| should not be optional. Make it |
Nasko Oskov | d22f9bf87 | 2020-12-23 00:31:35 | [diff] [blame] | 487 | // mandatory. |
Arthur Hemery | 7b67a97 | 2017-12-01 15:24:49 | [diff] [blame] | 488 | BeginNavigation( |
| 489 | CommonNavigationParams common_params, |
Marijn Kruisselbrink | 07bf59d5 | 2018-04-03 21:50:25 | [diff] [blame] | 490 | BeginNavigationParams begin_params, |
Julie Jeongeun Kim | 249cfbb | 2019-08-30 06:44:05 | [diff] [blame] | 491 | pending_remote<blink.mojom.BlobURLToken>? blob_url_token, |
Julie Jeongeun Kim | ed2e5ba7 | 2019-09-12 10:14:17 | [diff] [blame] | 492 | pending_associated_remote<NavigationClient>? navigation_client, |
Miyoung Shin | da5da32 | 2019-09-02 10:07:37 | [diff] [blame] | 493 | pending_remote<blink.mojom.NavigationInitiator>? navigation_initiator); |
John Abd-El-Malek | d488264 | 2017-12-04 21:45:19 | [diff] [blame] | 494 | |
| 495 | // Sent when a subresource response has started. |
Jay Civelli | d5904f0 | 2018-03-23 19:43:57 | [diff] [blame] | 496 | // |cert_status| is the bitmask of status info of the SSL certificate. (see |
| 497 | // net/cert/cert_status_flags.h). |
Lukasz Anforowicz | d334bba | 2020-02-10 23:32:55 | [diff] [blame] | 498 | SubresourceResponseStarted(url.mojom.Url url, uint32 cert_status); |
Jay Civelli | d5904f0 | 2018-03-23 19:43:57 | [diff] [blame] | 499 | |
Jay Civelli | 116683f | 2018-03-27 19:56:23 | [diff] [blame] | 500 | // Sent when a resource load finished, successfully or not. |
Minggang Wang | ee5af39 | 2020-02-05 02:55:28 | [diff] [blame] | 501 | ResourceLoadComplete(blink.mojom.ResourceLoadInfo url_load_info); |
Luciano Pacheco | 8def47f | 2017-12-07 06:52:30 | [diff] [blame] | 502 | |
| 503 | // Sent when the frame changes its window.name. |
| 504 | DidChangeName(string name, string unique_name); |
| 505 | |
Austin Tankiang | 10d6483 | 2017-12-20 02:43:55 | [diff] [blame] | 506 | // If a cross-process navigation was started for the initial history load in |
| 507 | // this subframe, this tries to cancel it to allow a client redirect to happen |
| 508 | // instead. |
| 509 | CancelInitialHistoryLoad(); |
| 510 | |
| 511 | // Change the encoding name of the page in UI when the page has detected |
| 512 | // proper encoding name. Sent for top-level frames. |
| 513 | UpdateEncoding(string encoding_name); |
Lucas Furukawa Gadani | e5d27a36 | 2018-02-13 14:26:02 | [diff] [blame] | 514 | |
Lucas Gadani | 471160f9 | 2018-03-01 03:13:21 | [diff] [blame] | 515 | // The frame's size is replicated in the browser so that the browser can |
| 516 | // correctly set the initial size of the frame in case of a cross-process |
| 517 | // navigation. |
| 518 | FrameSizeChanged(gfx.mojom.Size size); |
Becca Hughes | fd5d8f89 | 2018-06-14 18:23:36 | [diff] [blame] | 519 | |
Clark DuVall | a0e4299 | 2018-09-17 17:00:11 | [diff] [blame] | 520 | // Updates information to determine whether a user gesture should carryover to |
| 521 | // future navigations. This is needed so navigations within a certain |
| 522 | // timeframe of a request initiated by a gesture will be treated as if they |
| 523 | // were initiated by a gesture too, otherwise the navigation may be blocked. |
| 524 | [EnableIf=is_android] |
| 525 | UpdateUserGestureCarryoverInfo(); |
Lowell Manners | 9499addc | 2019-03-12 11:05:32 | [diff] [blame] | 526 | |
Ian Barkley-Yeung | 07d8a26 | 2020-11-19 22:45:35 | [diff] [blame] | 527 | // Blink and JavaScript error messages to log to the console, debugger UI, or |
| 528 | // error reporting service. |source_id| is usually a URL. |
| 529 | // |untrusted_stack_trace| should only be printed or sent to other services; |
| 530 | // it's untrusted and should not be parsed to get a structured stack trace. |
Ian Barkley-Yeung | bda77fb | 2020-12-08 04:26:46 | [diff] [blame] | 531 | // The stack trace is only present if |
| 532 | // FrameNavigationControl.SetWantErrorMessageStackTrace has been called for |
| 533 | // this frame and the log_level is kError. |
Lowell Manners | f03ea5a | 2019-04-23 11:47:58 | [diff] [blame] | 534 | DidAddMessageToConsole( |
| 535 | blink.mojom.ConsoleMessageLevel log_level, |
| 536 | mojo_base.mojom.BigString16 msg, |
| 537 | int32 line_number, |
Ian Barkley-Yeung | 07d8a26 | 2020-11-19 22:45:35 | [diff] [blame] | 538 | mojo_base.mojom.String16 source_id, |
| 539 | mojo_base.mojom.BigString16? untrusted_stack_trace); |
Lowell Manners | f03ea5a | 2019-04-23 11:47:58 | [diff] [blame] | 540 | |
Gyuyoung Kim | bc7dee64 | 2020-06-17 01:43:29 | [diff] [blame] | 541 | // Notifies the browser that this frame has new session history information. |
Ken Rockot | 4da6ac0 | 2020-10-27 01:28:25 | [diff] [blame] | 542 | // |
| 543 | // NOTE: PageState can be quite large when serialized, and its message |
| 544 | // structure must remain stable; hence [UnlimitedSize] for this message. |
| 545 | [UnlimitedSize] |
Gyuyoung Kim | bc7dee64 | 2020-06-17 01:43:29 | [diff] [blame] | 546 | UpdateState(PageState state); |
Gyuyoung Kim | 0028790a | 2020-06-26 00:09:00 | [diff] [blame] | 547 | |
| 548 | // Requests that the given URL be opened in the specified manner. |
| 549 | OpenURL(OpenURLParams params); |
Gyuyoung Kim | 847ecc7 | 2020-07-21 14:07:55 | [diff] [blame] | 550 | |
| 551 | // Called when the renderer is done loading a frame. |
| 552 | DidStopLoading(); |
ben | 76f52b24 | 2016-06-18 05:42:48 | [diff] [blame] | 553 | }; |