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 | |
Oksana Zhuravlova | 8b88e57 | 2019-01-07 21:54:00 | [diff] [blame] | 7 | import "content/common/document_scoped_interface_bundle.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"; |
Scott Violet | 0de3837c | 2019-09-06 22:51:54 | [diff] [blame] | 12 | import "content/public/common/browser_controls_state.mojom"; |
John Abd-El-Malek | d488264 | 2017-12-04 21:45:19 | [diff] [blame] | 13 | import "content/public/common/resource_type.mojom"; |
Jay Civelli | 116683f | 2018-03-27 19:56:23 | [diff] [blame] | 14 | import "content/public/common/resource_load_info.mojom"; |
John Abd-El-Malek | ecc6f5f | 2018-03-02 18:47:39 | [diff] [blame] | 15 | import "content/public/common/transferrable_url_loader.mojom"; |
csharrison | 95f01e92 | 2017-04-24 18:52:35 | [diff] [blame] | 16 | import "content/public/common/window_container_type.mojom"; |
Ken Rockot | 8b447d7 | 2018-02-03 20:30:47 | [diff] [blame] | 17 | import "mojo/public/mojom/base/string16.mojom"; |
Oksana Zhuravlova | 34579e91 | 2018-03-23 00:18:49 | [diff] [blame] | 18 | import "mojo/public/mojom/base/unguessable_token.mojom"; |
Hajime Hoshi | 35ad74f | 2019-03-07 08:38:05 | [diff] [blame] | 19 | import "mojo/public/mojom/base/values.mojom"; |
Lucas Furukawa Gadani | 3f61b95d | 2019-08-16 05:34:10 | [diff] [blame] | 20 | import "services/network/public/mojom/url_response_head.mojom"; |
Ken Rockot | 54311e6 | 2018-02-10 19:01:52 | [diff] [blame] | 21 | import "services/network/public/mojom/url_loader.mojom"; |
Kinuko Yasuda | d795ac7 | 2018-07-11 08:07:53 | [diff] [blame] | 22 | import "services/network/public/mojom/url_loader_factory.mojom"; |
Ken Rockot | 543f5e3 | 2018-02-04 02:13:50 | [diff] [blame] | 23 | import "services/service_manager/public/mojom/interface_provider.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"; |
Julie Jeongeun Kim | 42a90df | 2019-03-20 23:13:10 | [diff] [blame] | 26 | import "third_party/blink/public/mojom/commit_result/commit_result.mojom"; |
Lowell Manners | f03ea5a | 2019-04-23 11:47:58 | [diff] [blame] | 27 | import "third_party/blink/public/mojom/devtools/console_message.mojom"; |
Blink Reformat | a30d423 | 2018-04-07 15:31:06 | [diff] [blame] | 28 | import "third_party/blink/public/mojom/feature_policy/feature_policy.mojom"; |
Dave Tapuska | d6703f91 | 2019-01-31 23:13:11 | [diff] [blame] | 29 | import "third_party/blink/public/mojom/frame/lifecycle.mojom"; |
Andy Paicu | c93d3086 | 2018-10-10 15:33:45 | [diff] [blame] | 30 | import "third_party/blink/public/mojom/frame/navigation_initiator.mojom"; |
Jeremy Roman | 3c83b16 | 2019-03-12 16:55:52 | [diff] [blame] | 31 | import "third_party/blink/public/mojom/messaging/transferable_message.mojom"; |
Hiroki Nakagawa | 75375834 | 2018-12-27 04:13:49 | [diff] [blame] | 32 | import "third_party/blink/public/mojom/loader/url_loader_factory_bundle.mojom"; |
Yuzu Saijo | aae9170 | 2019-03-13 07:38:05 | [diff] [blame] | 33 | import "third_party/blink/public/mojom/messaging/transferable_message.mojom"; |
Lucas Furukawa Gadani | 89a7418 | 2019-01-10 19:33:22 | [diff] [blame] | 34 | import "third_party/blink/public/mojom/portal/portal.mojom"; |
Leon Han | 075e0b3 | 2018-11-06 07:59:44 | [diff] [blame] | 35 | import "third_party/blink/public/mojom/referrer.mojom"; |
Hiroki Nakagawa | cdbc791 | 2018-11-30 11:30:05 | [diff] [blame] | 36 | import "third_party/blink/public/mojom/service_worker/controller_service_worker.mojom"; |
Leon Han | 49c3ff6 | 2019-03-13 00:08:01 | [diff] [blame] | 37 | import "third_party/blink/public/mojom/service_worker/service_worker_provider.mojom"; |
Hiroki Nakagawa | 7c0a7e7 | 2018-12-10 04:31:29 | [diff] [blame] | 38 | import "third_party/blink/public/mojom/devtools/devtools_agent.mojom"; |
Lucas Furukawa Gadani | 9912582 | 2019-01-03 15:41:49 | [diff] [blame] | 39 | import "third_party/blink/public/mojom/portal/portal.mojom"; |
Julie Jeongeun Kim | 42a90df | 2019-03-20 23:13:10 | [diff] [blame] | 40 | import "third_party/blink/public/mojom/window_features/window_features.mojom"; |
Julie Jeongeun Kim | 2b1d45a | 2019-06-28 23:37:54 | [diff] [blame] | 41 | import "ui/base/mojom/window_open_disposition.mojom"; |
Daniel Cheng | 7a059b0 | 2018-02-03 10:04:13 | [diff] [blame] | 42 | import "url/mojom/url.mojom"; |
Adithya Srinivasan | 57f44d0d | 2019-03-22 15:36:02 | [diff] [blame] | 43 | import "url/mojom/origin.mojom"; |
Miyoung Shin | 87943f50 | 2019-07-26 13:31:58 | [diff] [blame] | 44 | import "ui/gfx/geometry/mojom/geometry.mojom"; |
ben | 76f52b24 | 2016-06-18 05:42:48 | [diff] [blame] | 45 | |
ben | 275a565 | 2016-10-28 16:55:50 | [diff] [blame] | 46 | // The name of the InterfaceProviderSpec in service manifests used by the |
| 47 | // frame tree to expose frame-specific interfaces between renderer and browser. |
| 48 | const string kNavigation_FrameSpec = "navigation:frame"; |
| 49 | |
ben | 76f52b24 | 2016-06-18 05:42:48 | [diff] [blame] | 50 | // Implemented by the frame provider (e.g. renderer processes). |
| 51 | interface Frame { |
rockot | 400ea35b | 2016-10-15 19:15:32 | [diff] [blame] | 52 | GetInterfaceProvider(service_manager.mojom.InterfaceProvider& interfaces); |
Daniel Cheng | 118f9e28 | 2017-11-10 03:28:44 | [diff] [blame] | 53 | GetCanonicalUrlForSharing() => (url.mojom.Url? canonical_url); |
Luciano Pacheco | 8528c16f | 2017-12-14 07:10:56 | [diff] [blame] | 54 | |
John Abd-El-Malek | 9405d80e | 2018-08-08 16:50:21 | [diff] [blame] | 55 | // Causes all new subresource requests to be blocked (not being started) until |
| 56 | // ResumeBlockedRequests is called. |
| 57 | BlockRequests(); |
| 58 | |
| 59 | // Resumes blocked requests. |
| 60 | // It is safe to call this without calling BlockRequests. |
| 61 | ResumeBlockedRequests(); |
| 62 | |
| 63 | // Cancels blocked requests. BlockRequests must have been called before. |
| 64 | CancelBlockedRequests(); |
| 65 | |
Dave Tapuska | 1dd5774 | 2019-02-07 01:07:37 | [diff] [blame] | 66 | // Set the lifecycle state. |
| 67 | SetLifecycleState(blink.mojom.FrameLifecycleState state); |
| 68 | |
Luciano Pacheco | 8528c16f | 2017-12-14 07:10:56 | [diff] [blame] | 69 | // Samsung Galaxy Note-specific "smart clip" stylus text getter. |
| 70 | // Extracts the data at the given rect. |
Eve Martin-Jones | 40f552c | 2018-02-14 22:47:32 | [diff] [blame] | 71 | [EnableIf=is_android] |
Luciano Pacheco | 8528c16f | 2017-12-14 07:10:56 | [diff] [blame] | 72 | ExtractSmartClipData(gfx.mojom.Rect rect) |
Mahesh Machavolu | 346cd266 | 2018-05-24 12:40:11 | [diff] [blame] | 73 | => (mojo_base.mojom.String16 text, mojo_base.mojom.String16 html, |
| 74 | gfx.mojom.Rect clip_rect); |
Scott Violet | 0de3837c | 2019-09-06 22:51:54 | [diff] [blame] | 75 | |
| 76 | // Notifies the renderer whether hiding/showing the browser controls is |
| 77 | // enabled, what the current state should be, and whether or not to |
| 78 | // animate to the proper state. |
| 79 | UpdateBrowserControlsState(BrowserControlsState constraints, |
| 80 | BrowserControlsState current, |
| 81 | bool animate); |
ben | 76f52b24 | 2016-06-18 05:42:48 | [diff] [blame] | 82 | }; |
| 83 | |
Ken Rockot | 4878545 | 2017-10-25 19:33:14 | [diff] [blame] | 84 | // Implemented by the frame provider and currently must be associated with the |
| 85 | // legacy IPC channel. |
Arthur Hemery | d3011f6 | 2018-05-30 10:38:44 | [diff] [blame] | 86 | // KEEP THE COMMIT FUNCTIONS IN SYNC in content/common/navigation_client.mojom. |
| 87 | // These will eventually be removed from FrameNavigationControl. |
Ken Rockot | 4878545 | 2017-10-25 19:33:14 | [diff] [blame] | 88 | interface FrameNavigationControl { |
arthursonzogni | 3a4ca9f | 2017-12-07 17:58:34 | [diff] [blame] | 89 | // Tells the renderer that a navigation is ready to commit. |
| 90 | // |
arthursonzogni | f34adf09 | 2018-04-24 17:06:13 | [diff] [blame] | 91 | // The renderer should bind the |url_loader_client_endpoints| to an |
| 92 | // URLLoaderClient implementation to continue loading the document that will |
| 93 | // be the result of the committed navigation. |
arthursonzogni | 3a4ca9f | 2017-12-07 17:58:34 | [diff] [blame] | 94 | // |
arthursonzogni | f34adf09 | 2018-04-24 17:06:13 | [diff] [blame] | 95 | // Note: |url_loader_client_endpoints| will be empty iff the navigation URL |
Arthur Hemery | d3011f6 | 2018-05-30 10:38:44 | [diff] [blame] | 96 | // wasn't handled by the network stack (i.e. about:blank, ...) |
arthursonzogni | 3a4ca9f | 2017-12-07 17:58:34 | [diff] [blame] | 97 | // |
Minggang Wang | 47a7822 | 2019-06-28 17:05:46 | [diff] [blame] | 98 | // Note: |response_body| is only used when NavigationImmediateResponseBody is |
| 99 | // enabled. It contains the datapipe used to read the response body. |
| 100 | // |
arthursonzogni | 3a4ca9f | 2017-12-07 17:58:34 | [diff] [blame] | 101 | // When the Network Service is enabled, |subresource_loader_factories| may |
| 102 | // also be provided by the browser as a a means for the renderer to load |
| 103 | // subresources where applicable. |
Pavel Feldman | f20fc9d | 2017-11-17 09:13:30 | [diff] [blame] | 104 | // |
arthursonzogni | b950d90 | 2018-02-08 09:27:13 | [diff] [blame] | 105 | // |controller_service_worker_info| may also be provided by the browser if the |
| 106 | // frame that is being navigated is supposed to be controlled by a Service |
| 107 | // Worker. |
Leon Han | 49c3ff6 | 2019-03-13 00:08:01 | [diff] [blame] | 108 | // |provider_info| may also be provided if the browser has created a |
| 109 | // ServiceWorkerProviderHost for this navigation. |
Kinuko Yasuda | d795ac7 | 2018-07-11 08:07:53 | [diff] [blame] | 110 | // |prefetch_loader_factory| is populated only when Network Service is |
| 111 | // enabled. The pointer is used to start a prefetch loading via the browser |
| 112 | // process. |
Kinuko Yasuda | ba38408 | 2018-01-11 08:30:16 | [diff] [blame] | 113 | // |
Pavel Feldman | f20fc9d | 2017-11-17 09:13:30 | [diff] [blame] | 114 | // For automation driver-initiated navigations over the devtools protocol, |
| 115 | // |devtools_navigation_token_| is used to tag the navigation. This navigation |
| 116 | // token is then sent into the renderer and lands on the DocumentLoader. That |
| 117 | // way subsequent Blink-level frame lifecycle events can be associated with |
| 118 | // the concrete navigation. |
| 119 | // - The value should not be sent back to the browser. |
| 120 | // - The value on DocumentLoader may be generated in the renderer in some |
| 121 | // cases, and thus shouldn't be trusted. |
| 122 | // TODO(crbug.com/783506): Replace devtools navigation token with the generic |
| 123 | // navigation token that can be passed from renderer to the browser. |
arthursonzogni | 3a4ca9f | 2017-12-07 17:58:34 | [diff] [blame] | 124 | CommitNavigation( |
arthursonzogni | 3a4ca9f | 2017-12-07 17:58:34 | [diff] [blame] | 125 | CommonNavigationParams common_params, |
Nasko Oskov | c36327d | 2019-01-03 23:23:04 | [diff] [blame] | 126 | CommitNavigationParams request_params, |
Minggang Wang | 47a7822 | 2019-06-28 17:05:46 | [diff] [blame] | 127 | network.mojom.URLResponseHead response_head, |
| 128 | handle<data_pipe_consumer>? response_body, |
John Abd-El-Malek | b165dc5 | 2018-01-18 17:12:18 | [diff] [blame] | 129 | network.mojom.URLLoaderClientEndpoints? url_loader_client_endpoints, |
Hiroki Nakagawa | 75375834 | 2018-12-27 04:13:49 | [diff] [blame] | 130 | blink.mojom.URLLoaderFactoryBundle? subresource_loader_factories, |
John Abd-El-Malek | ecc6f5f | 2018-03-02 18:47:39 | [diff] [blame] | 131 | array<TransferrableURLLoader>? subresource_overrides, |
Hiroki Nakagawa | cdbc791 | 2018-11-30 11:30:05 | [diff] [blame] | 132 | blink.mojom.ControllerServiceWorkerInfo? controller_service_worker_info, |
Matt Falkenhagen | 5e340f1 | 2019-07-21 01:28:37 | [diff] [blame] | 133 | blink.mojom.ServiceWorkerProviderInfoForClient? provider_info, |
Kinuko Yasuda | 8fb556c | 2019-07-16 05:47:55 | [diff] [blame] | 134 | pending_remote<network.mojom.URLLoaderFactory>? prefetch_loader_factory, |
clamy | 6b92fcf | 2018-06-01 13:51:37 | [diff] [blame] | 135 | mojo_base.mojom.UnguessableToken devtools_navigation_token) |
| 136 | => (blink.mojom.CommitResult commit_result); |
Doug Turner | 84693be | 2017-12-19 00:18:46 | [diff] [blame] | 137 | |
| 138 | // Tells the renderer that a failed navigation is ready to commit. |
| 139 | // |
| 140 | // The result of this commit usually results in displaying an error page. |
| 141 | // Note |error_page_content| may contain the content of the error page |
| 142 | // (i.e. flattened HTML, JS, CSS). |
| 143 | // |
| 144 | // When the Network Service is enabled, |subresource_loader_factories| may |
Conley Owens | 7a78fab | 2018-03-10 06:27:49 | [diff] [blame] | 145 | // also be provided by the browser as a means for the renderer to load |
Doug Turner | 84693be | 2017-12-19 00:18:46 | [diff] [blame] | 146 | // subresources where applicable. |
| 147 | CommitFailedNavigation( |
| 148 | CommonNavigationParams common_params, |
Nasko Oskov | c36327d | 2019-01-03 23:23:04 | [diff] [blame] | 149 | CommitNavigationParams request_params, |
Doug Turner | 84693be | 2017-12-19 00:18:46 | [diff] [blame] | 150 | bool has_stale_copy_in_cache, |
| 151 | int32 error_code, |
| 152 | string? error_page_content, |
Hiroki Nakagawa | 75375834 | 2018-12-27 04:13:49 | [diff] [blame] | 153 | blink.mojom.URLLoaderFactoryBundle? subresource_loader_factories) |
clamy | 6b92fcf | 2018-06-01 13:51:37 | [diff] [blame] | 154 | => (blink.mojom.CommitResult commit_result); |
Chong Zhang | 7306b0b | 2018-01-24 05:59:24 | [diff] [blame] | 155 | |
clamy | af4bf2d9 | 2018-02-06 10:54:36 | [diff] [blame] | 156 | // Tells the renderer that a same-document navigation should be committed. |
| 157 | // The renderer will return a status value indicating whether the commit |
| 158 | // could proceed as expected or not. In particular, it might be necessary to |
| 159 | // restart the navigation if it is no-longer same-document, which can happen |
| 160 | // if the renderer committed another navigation in the meantime. |
| 161 | CommitSameDocumentNavigation( |
| 162 | CommonNavigationParams common_params, |
Nasko Oskov | c36327d | 2019-01-03 23:23:04 | [diff] [blame] | 163 | CommitNavigationParams request_params) |
clamy | af4bf2d9 | 2018-02-06 10:54:36 | [diff] [blame] | 164 | => (blink.mojom.CommitResult commit_result); |
| 165 | |
clamy | b1df7b96 | 2018-02-01 17:38:17 | [diff] [blame] | 166 | // Asks the renderer to handle a renderer-debug URL. |
| 167 | HandleRendererDebugURL(url.mojom.Url url); |
| 168 | |
Chong Zhang | 7306b0b | 2018-01-24 05:59:24 | [diff] [blame] | 169 | // Provides the renderer an updated |subresource_loader_factories|. |
| 170 | // |
| 171 | // This method is intended to fix broken loaders after a Network Service |
| 172 | // crash, and is only used when Network Service is enabled. |
| 173 | // |
| 174 | // The new bundle contains replacement factories for a subset of the |
| 175 | // receiver's existing bundle. |
| 176 | UpdateSubresourceLoaderFactories( |
Hiroki Nakagawa | 75375834 | 2018-12-27 04:13:49 | [diff] [blame] | 177 | blink.mojom.URLLoaderFactoryBundle subresource_loader_factories); |
Dmitry Gozman | 6adf95b | 2018-10-10 22:12:19 | [diff] [blame] | 178 | |
| 179 | // Returns a DevToolsAgent interface for this frame, used for |
| 180 | // remote debugging. See DevToolsAgent for details. |
| 181 | // Returned DevToolsAgent must be associated with navigation control, |
| 182 | // due to various ordering dependencies between DevTools protocol and |
| 183 | // navigation. |
Julie Jeongeun Kim | 0788779 | 2019-08-13 11:05:48 | [diff] [blame] | 184 | BindDevToolsAgent( |
| 185 | pending_associated_remote<blink.mojom.DevToolsAgentHost> agent_host, |
| 186 | pending_associated_receiver<blink.mojom.DevToolsAgent> agent); |
Hajime Hoshi | 35ad74f | 2019-03-07 08:38:05 | [diff] [blame] | 187 | |
| 188 | // Request for the renderer to execute JavaScript in the frame's context. |
| 189 | // |
| 190 | // |javascript| is the string containing the JavaScript to be executed in the |
| 191 | // target frame's context. |
| 192 | // |
Avi Drissman | 8e3ebe9 | 2019-06-10 20:26:11 | [diff] [blame] | 193 | // |wants_result| is true if the result of this execution is required by the |
| 194 | // caller. If it is false, a reply is still required by Mojo, but a null value |
| 195 | // should be returned to avoid issues serializing a large, unwanted reply. |
| 196 | // |
Hajime Hoshi | 35ad74f | 2019-03-07 08:38:05 | [diff] [blame] | 197 | // TODO(hajimehoshi): This requires navigate association to keep the message |
| 198 | // order with other navigation-related messages. Fix this and move this to a |
| 199 | // non-navigate-related interface if possible. |
Avi Drissman | 4544828f | 2019-03-11 20:37:32 | [diff] [blame] | 200 | JavaScriptExecuteRequest( |
Avi Drissman | 8e3ebe9 | 2019-06-10 20:26:11 | [diff] [blame] | 201 | mojo_base.mojom.String16 javascript, |
| 202 | bool wants_result) => (mojo_base.mojom.Value result); |
Hajime Hoshi | 35ad74f | 2019-03-07 08:38:05 | [diff] [blame] | 203 | |
Avi Drissman | 4544828f | 2019-03-11 20:37:32 | [diff] [blame] | 204 | // ONLY FOR TESTS: Same as above but adds a fake UserGestureIndicator around |
Hajime Hoshi | 35ad74f | 2019-03-07 08:38:05 | [diff] [blame] | 205 | // execution. (crbug.com/408426) |
Avi Drissman | 4544828f | 2019-03-11 20:37:32 | [diff] [blame] | 206 | JavaScriptExecuteRequestForTests( |
| 207 | mojo_base.mojom.String16 javascript, |
Avi Drissman | 8e3ebe9 | 2019-06-10 20:26:11 | [diff] [blame] | 208 | bool wants_result, |
Hajime Hoshi | f85e7cf72 | 2019-07-19 00:54:49 | [diff] [blame] | 209 | bool has_user_gesture, |
| 210 | int32 world_id) |
Avi Drissman | 4544828f | 2019-03-11 20:37:32 | [diff] [blame] | 211 | => (mojo_base.mojom.Value result); |
Hajime Hoshi | 35ad74f | 2019-03-07 08:38:05 | [diff] [blame] | 212 | |
| 213 | // Same as JavaScriptExecuteRequest above except the script is run in the |
| 214 | // isolated world specified by the fourth parameter. |
Avi Drissman | 4544828f | 2019-03-11 20:37:32 | [diff] [blame] | 215 | JavaScriptExecuteRequestInIsolatedWorld( |
| 216 | mojo_base.mojom.String16 javascript, |
Avi Drissman | 8e3ebe9 | 2019-06-10 20:26:11 | [diff] [blame] | 217 | bool wants_result, |
Avi Drissman | 4544828f | 2019-03-11 20:37:32 | [diff] [blame] | 218 | int32 world_id) => (mojo_base.mojom.Value result); |
Yuzu Saijo | aae9170 | 2019-03-13 07:38:05 | [diff] [blame] | 219 | |
| 220 | // Posts a message from a frame in another process to the current renderer. |
| 221 | // |source_routing_id| is the routing ID of the source frame in the source |
| 222 | // process when sent to the browser. The browser replaces it with the routing |
| 223 | // ID of the equivalent frame proxy in the destination process. |
| 224 | // |source_origin| is the origin of the source frame when the message was |
| 225 | // sent, and |target_origin| specifies what the origin of the target frame |
| 226 | // must be for the message to be dispatched. An empty string allows the |
| 227 | // message to be dispatched to any origin. |
| 228 | // |message| is the encoded data, and any extra properties such as |
| 229 | // transferred ports or blobs. |
| 230 | PostMessageEvent(int32 source_routing_id, |
| 231 | mojo_base.mojom.String16 source_origin, |
| 232 | mojo_base.mojom.String16 target_origin, |
| 233 | blink.mojom.TransferableMessage message); |
Lucas Furukawa Gadani | 56dd545 | 2019-03-22 18:23:12 | [diff] [blame] | 234 | |
Adithya Srinivasan | e8bf80e | 2019-05-01 15:39:31 | [diff] [blame] | 235 | // Forwards a message from a portal's host to the main frame in the portal's |
| 236 | // guest contents. |
| 237 | ForwardMessageFromHost(blink.mojom.TransferableMessage message, |
| 238 | url.mojom.Origin source_origin, |
| 239 | url.mojom.Origin? target_origin); |
Adithya Srinivasan | 324086b | 2019-03-26 17:06:58 | [diff] [blame] | 240 | |
Lucas Furukawa Gadani | 56dd545 | 2019-03-22 18:23:12 | [diff] [blame] | 241 | // Called on the main frame of a page embedded in a Portal when it is |
| 242 | // activated. The frame has the option to adopt the previous page as a portal |
| 243 | // identified by |portal_token| with the interface |portal|. The activation |
| 244 | // can optionally include a message |data| dispatched with the |
Adithya Srinivasan | e4f0e070 | 2019-04-18 23:17:20 | [diff] [blame] | 245 | // PortalActivateEvent. The return value |was_adopted| indicates if the portal |
| 246 | // for the predecessor (identified by |portal_token|) was adopted by the |
| 247 | // current frame. |
Jeremy Roman | d92e137 | 2019-06-04 16:31:17 | [diff] [blame] | 248 | OnPortalActivated( |
| 249 | mojo_base.mojom.UnguessableToken portal_token, |
| 250 | pending_associated_remote<blink.mojom.Portal> portal, |
| 251 | pending_associated_receiver<blink.mojom.PortalClient> portal_client, |
| 252 | blink.mojom.TransferableMessage data) => (bool was_adopted); |
Ken Rockot | 4878545 | 2017-10-25 19:33:14 | [diff] [blame] | 253 | }; |
| 254 | |
sammc | 7f6c6a0 | 2017-01-30 00:53:51 | [diff] [blame] | 255 | // Implemented by the frame (e.g. renderer processes). |
| 256 | // Instances of this interface must be associated with (i.e., FIFO with) the |
| 257 | // legacy IPC channel. |
| 258 | interface FrameBindingsControl { |
| 259 | // Used to tell a render frame whether it should expose various bindings |
| 260 | // that allow JS content extended privileges. See BindingsPolicy for valid |
| 261 | // flag values. |
| 262 | AllowBindings(int32 enabled_bindings_flags); |
Nasko Oskov | 8a73f7d | 2019-09-27 22:29:32 | [diff] [blame^] | 263 | |
| 264 | // Used to tell the RenderFrame to enable Mojo JS bindings, which allows |
| 265 | // JS code running in the renderer process to connect to Mojo interfaces |
| 266 | // and make method calls on them. |
| 267 | // This is used for WebUI only at this time. |
| 268 | EnableMojoJsBindings(); |
sammc | 7f6c6a0 | 2017-01-30 00:53:51 | [diff] [blame] | 269 | }; |
| 270 | |
ben | 76f52b24 | 2016-06-18 05:42:48 | [diff] [blame] | 271 | // Implemented by a service that provides implementations of the Frame |
| 272 | // interface. (e.g. renderer processes). |
| 273 | interface FrameFactory { |
Balazs Engedy | ba034e7 | 2017-10-27 22:26:28 | [diff] [blame] | 274 | CreateFrame(int32 frame_routing_id, Frame& frame); |
csharrison | 95f01e92 | 2017-04-24 18:52:35 | [diff] [blame] | 275 | }; |
| 276 | |
csharrison | 95f01e92 | 2017-04-24 18:52:35 | [diff] [blame] | 277 | struct CreateNewWindowParams { |
| 278 | // True if this open request came in the context of a user gesture. |
Mustaq Ahmed | c4cb716 | 2018-06-05 16:28:36 | [diff] [blame] | 279 | // |
| 280 | // TODO(mustaq): We have cases where a user gesture is assumed to be |
| 281 | // there even when it's not the case. See https://crbug.com/843233. |
| 282 | bool mimic_user_gesture; |
csharrison | 95f01e92 | 2017-04-24 18:52:35 | [diff] [blame] | 283 | |
| 284 | // Type of window requested. |
| 285 | WindowContainerType window_container_type; |
| 286 | |
| 287 | // The session storage namespace ID this window should use. |
Daniel Murphy | 31bbb8b1 | 2018-02-07 21:44:10 | [diff] [blame] | 288 | string session_storage_namespace_id; |
csharrison | 95f01e92 | 2017-04-24 18:52:35 | [diff] [blame] | 289 | |
Daniel Murphy | e3eec92c | 2018-02-23 19:09:15 | [diff] [blame] | 290 | // The session storage namespace ID this window should clone from. |
| 291 | // TODO(dmurph): Remove this once session storage is fully mojo'd, as the |
| 292 | // clone call happens on a different interface. https://crbug.com/716490 |
| 293 | string clone_from_session_storage_namespace_id; |
| 294 | |
csharrison | 95f01e92 | 2017-04-24 18:52:35 | [diff] [blame] | 295 | // The name of the resulting frame that should be created (empty if none |
| 296 | // has been specified). UTF8 encoded string. |
| 297 | string frame_name; |
| 298 | |
csharrison | 95f01e92 | 2017-04-24 18:52:35 | [diff] [blame] | 299 | // Whether the opener will be suppressed in the new window, in which case |
| 300 | // scripting the new window is not allowed. |
| 301 | bool opener_suppressed; |
| 302 | |
| 303 | // Whether the window should be opened in the foreground, background, etc. |
| 304 | ui.mojom.WindowOpenDisposition disposition; |
| 305 | |
| 306 | // The URL that will be loaded in the new window (empty if none has been |
| 307 | // specified). |
| 308 | url.mojom.Url target_url; |
| 309 | |
| 310 | // The referrer that will be used to load |target_url| (empty if none has |
| 311 | // been specified). |
| 312 | blink.mojom.Referrer referrer; |
| 313 | |
| 314 | // The window features to use for the new window. |
| 315 | blink.mojom.WindowFeatures features; |
| 316 | }; |
| 317 | |
Daniel Cheng | 8bb30c6 | 2017-10-23 20:40:47 | [diff] [blame] | 318 | // Operation result when the renderer asks the browser to create a new window. |
| 319 | enum CreateNewWindowStatus { |
| 320 | // Ignore creation of the new window. This can happen because creation is |
| 321 | // blocked or because the new window should have no opener relationship. |
| 322 | kIgnore, |
| 323 | // Reuse the current window rather than creating a new window. |
| 324 | kReuse, |
| 325 | // Create a new window using the corresponding params in |reply|. |
| 326 | kSuccess, |
| 327 | }; |
| 328 | |
| 329 | // All routing IDs in this struct must be set to a valid routing ID. |
csharrison | 95f01e92 | 2017-04-24 18:52:35 | [diff] [blame] | 330 | struct CreateNewWindowReply { |
Daniel Cheng | 8bb30c6 | 2017-10-23 20:40:47 | [diff] [blame] | 331 | // The ID of the view to be created. |
csharrison | 95f01e92 | 2017-04-24 18:52:35 | [diff] [blame] | 332 | int32 route_id; |
| 333 | |
| 334 | // The ID of the main frame hosted in the view. |
| 335 | int32 main_frame_route_id; |
| 336 | |
| 337 | // The ID of the widget for the main frame. |
| 338 | int32 main_frame_widget_route_id; |
| 339 | |
Oksana Zhuravlova | 8b88e57 | 2019-01-07 21:54:00 | [diff] [blame] | 340 | DocumentScopedInterfaceBundle main_frame_interface_bundle; |
Balazs Engedy | ba034e7 | 2017-10-27 22:26:28 | [diff] [blame] | 341 | |
csharrison | 95f01e92 | 2017-04-24 18:52:35 | [diff] [blame] | 342 | // Duplicated from CreateNewWindowParams because legacy code. |
Daniel Murphy | 31bbb8b1 | 2018-02-07 21:44:10 | [diff] [blame] | 343 | string cloned_session_storage_namespace_id; |
Pavel Feldman | 08beed784 | 2017-10-17 19:18:11 | [diff] [blame] | 344 | |
| 345 | // Used for devtools instrumentation and trace-ability. The token is |
| 346 | // propagated to Blink's LocalFrame and both Blink and content/ |
| 347 | // can tag calls and requests with this instrumentation token in order to |
| 348 | // attribute them to the context frame. |
| 349 | // |devtools_frame_token| is only defined by the browser and is never |
| 350 | // sent back from the renderer in the control calls. |
Oksana Zhuravlova | 34579e91 | 2018-03-23 00:18:49 | [diff] [blame] | 351 | mojo_base.mojom.UnguessableToken devtools_main_frame_token; |
csharrison | 95f01e92 | 2017-04-24 18:52:35 | [diff] [blame] | 352 | }; |
| 353 | |
Yutaka Hirano | f7f2f63 | 2017-09-06 10:40:08 | [diff] [blame] | 354 | // An opaque handle that keeps alive the associated render process even after |
| 355 | // the frame is detached. Used by resource requests with "keepalive" specified. |
| 356 | interface KeepAliveHandle {}; |
| 357 | |
csharrison | 95f01e92 | 2017-04-24 18:52:35 | [diff] [blame] | 358 | // Implemented by the frame server (i.e. the browser process). For messages that |
| 359 | // must be associated with the IPC channel. |
| 360 | interface FrameHost { |
Daniel Cheng | 8bb30c6 | 2017-10-23 20:40:47 | [diff] [blame] | 361 | // Sent by the renderer to request the browser to create a new window. |reply| |
| 362 | // is only non-null on when status == CreateNewWindowStatus::kSuccess. |
csharrison | 95f01e92 | 2017-04-24 18:52:35 | [diff] [blame] | 363 | [Sync] CreateNewWindow(CreateNewWindowParams params) |
Daniel Cheng | 8bb30c6 | 2017-10-23 20:40:47 | [diff] [blame] | 364 | => (CreateNewWindowStatus status, CreateNewWindowReply? reply); |
Yutaka Hirano | f7f2f63 | 2017-09-06 10:40:08 | [diff] [blame] | 365 | |
Lucas Furukawa Gadani | 9912582 | 2019-01-03 15:41:49 | [diff] [blame] | 366 | // Sent by the renderer process to request the creation of a new portal. |
Adithya Srinivasan | e8bf80e | 2019-05-01 15:39:31 | [diff] [blame] | 367 | // |portal| is the pipe to be used for the Portal object, |client| is the pipe |
| 368 | // used to communicate back with the caller. Returns |proxy_routing_id|, which |
| 369 | // is the routing id of the RenderFrameProxy and |portal_token|, which is the |
| 370 | // unique identifier for the portal. |
Jeremy Roman | d92e137 | 2019-06-04 16:31:17 | [diff] [blame] | 371 | [Sync] CreatePortal( |
| 372 | pending_associated_receiver<blink.mojom.Portal> portal, |
| 373 | pending_associated_remote<blink.mojom.PortalClient> client) |
Lucas Furukawa Gadani | 9912582 | 2019-01-03 15:41:49 | [diff] [blame] | 374 | => (int32 proxy_routing_id, |
Lucas Furukawa Gadani | f68204d | 2019-04-30 17:30:24 | [diff] [blame] | 375 | mojo_base.mojom.UnguessableToken portal_token, |
| 376 | mojo_base.mojom.UnguessableToken devtools_frame_token); |
Lucas Furukawa Gadani | 9912582 | 2019-01-03 15:41:49 | [diff] [blame] | 377 | |
Lucas Furukawa Gadani | 56dd545 | 2019-03-22 18:23:12 | [diff] [blame] | 378 | // Requests that this frame adopts the portal identified by |portal_token|. |
| 379 | // Returns |proxy_routing_id|, which is the routing id of the portal's |
Jeremy Roman | 62fee22 | 2019-07-09 17:34:14 | [diff] [blame] | 380 | // RenderFrameProxy, |replicated_state|, the replicated state associated with |
| 381 | // that RFP, and the |devtools_frame_token|. |
Lucas Furukawa Gadani | 56dd545 | 2019-03-22 18:23:12 | [diff] [blame] | 382 | [Sync] AdoptPortal(mojo_base.mojom.UnguessableToken portal_token) |
Lucas Furukawa Gadani | f68204d | 2019-04-30 17:30:24 | [diff] [blame] | 383 | => (int32 proxy_routing_id, |
Jeremy Roman | 62fee22 | 2019-07-09 17:34:14 | [diff] [blame] | 384 | FrameReplicationState replicated_state, |
Lucas Furukawa Gadani | f68204d | 2019-04-30 17:30:24 | [diff] [blame] | 385 | mojo_base.mojom.UnguessableToken devtools_frame_token); |
Lucas Furukawa Gadani | 56dd545 | 2019-03-22 18:23:12 | [diff] [blame] | 386 | |
Yutaka Hirano | f7f2f63 | 2017-09-06 10:40:08 | [diff] [blame] | 387 | // Creates and returns a KeepAliveHandle. |
| 388 | IssueKeepAliveHandle(KeepAliveHandle& keep_alive_handle); |
Balazs Engedy | a40712f | 2017-09-15 15:01:11 | [diff] [blame] | 389 | |
| 390 | // Sent by the renderer when a navigation commits in the frame. |
Oksana Zhuravlova | 8b88e57 | 2019-01-07 21:54:00 | [diff] [blame] | 391 | |
| 392 | // If |interface_params| is non-empty, the FrameHost implementation |
| 393 | // must unbind the old InterfaceProvider and DocumentInterfaceBroker |
| 394 | // connections, and drop any interface requests pending on them. |
| 395 | // Then it should bind the appropriate requests and start servicing |
| 396 | // GetInterface messages coming in on these new connections |
Balazs Engedy | 0c8d550b | 2017-12-06 21:30:23 | [diff] [blame] | 397 | // in a security context that is appropriate for the committed navigation. |
| 398 | // |
Oksana Zhuravlova | 8b88e57 | 2019-01-07 21:54:00 | [diff] [blame] | 399 | // The FrameHost implementation must enforce that |interface_params| |
Balazs Engedy | 0c8d550b | 2017-12-06 21:30:23 | [diff] [blame] | 400 | // is set for cross-document navigations. This prevents origin confusion by |
| 401 | // ensuring that interface requests racing with navigation commit will be |
| 402 | // either ignored, or serviced correctly in the security context of the |
| 403 | // document they originated from (based on which InterfaceProvider connection |
Oksana Zhuravlova | 8b88e57 | 2019-01-07 21:54:00 | [diff] [blame] | 404 | // the GetInterface messages arrive on or DocumentInterfaceBroker |
| 405 | // connection the Get<interface> messages arrive on). |
Balazs Engedy | a40712f | 2017-09-15 15:01:11 | [diff] [blame] | 406 | DidCommitProvisionalLoad( |
Balazs Engedy | 0c8d550b | 2017-12-06 21:30:23 | [diff] [blame] | 407 | DidCommitProvisionalLoadParams params, |
Oksana Zhuravlova | 8b88e57 | 2019-01-07 21:54:00 | [diff] [blame] | 408 | DidCommitProvisionalLoadInterfaceParams? interface_params); |
Arthur Hemery | 7b67a97 | 2017-12-01 15:24:49 | [diff] [blame] | 409 | |
Arthur Hemery | 7b0ae49 | 2018-02-05 16:04:45 | [diff] [blame] | 410 | // Sent by the renderer to indicate that a same document navigation |
| 411 | // committed in the renderer process. |
| 412 | DidCommitSameDocumentNavigation( |
| 413 | DidCommitProvisionalLoadParams params); |
| 414 | |
Arthur Hemery | 7b67a97 | 2017-12-01 15:24:49 | [diff] [blame] | 415 | // Sent by the renderer to request a navigation. |
Marijn Kruisselbrink | 07bf59d5 | 2018-04-03 21:50:25 | [diff] [blame] | 416 | // |blob_url_token| should be non-null when this is a navigation to a blob: |
| 417 | // URL. The token will then be used to look up the blob associated with the |
| 418 | // blob URL. Without this by the time the navigation code starts fetching |
| 419 | // the URL the blob URL might no longer be valid. |blob_url_token| is |
| 420 | // not part of BeginNavigationParams because that struct needs to be |
| 421 | // cloneable, and thus can't contain mojo interfaces. |
| 422 | // If an invalid BlobURLToken is passed in, or if the token doesn't match the |
| 423 | // url in |common_params|, the navigation will result in a network error. |
Arthur Hemery | d3011f6 | 2018-05-30 10:38:44 | [diff] [blame] | 424 | // |navigation_client| is passed to the renderer to allow for further control |
| 425 | // of the navigation. Allows for Commit and Cancels/Aborts. It is only valid |
| 426 | // when PerNavigationMojoInterface is enabled. |
| 427 | // TODO(ahemery): |navigation_client| should not be optional. Make it |
| 428 | // mandatory when removing PerNavigationMojoInterface feature flag. |
Arthur Hemery | 7b67a97 | 2017-12-01 15:24:49 | [diff] [blame] | 429 | BeginNavigation( |
| 430 | CommonNavigationParams common_params, |
Marijn Kruisselbrink | 07bf59d5 | 2018-04-03 21:50:25 | [diff] [blame] | 431 | BeginNavigationParams begin_params, |
Julie Jeongeun Kim | 249cfbb | 2019-08-30 06:44:05 | [diff] [blame] | 432 | pending_remote<blink.mojom.BlobURLToken>? blob_url_token, |
Julie Jeongeun Kim | ed2e5ba7 | 2019-09-12 10:14:17 | [diff] [blame] | 433 | pending_associated_remote<NavigationClient>? navigation_client, |
Miyoung Shin | da5da32 | 2019-09-02 10:07:37 | [diff] [blame] | 434 | pending_remote<blink.mojom.NavigationInitiator>? navigation_initiator); |
John Abd-El-Malek | d488264 | 2017-12-04 21:45:19 | [diff] [blame] | 435 | |
| 436 | // Sent when a subresource response has started. |
Jay Civelli | d5904f0 | 2018-03-23 19:43:57 | [diff] [blame] | 437 | // |cert_status| is the bitmask of status info of the SSL certificate. (see |
| 438 | // net/cert/cert_status_flags.h). |
| 439 | SubresourceResponseStarted(url.mojom.Url url, uint32 cert_status); |
| 440 | |
Jay Civelli | 116683f | 2018-03-27 19:56:23 | [diff] [blame] | 441 | // Sent when a resource load finished, successfully or not. |
| 442 | ResourceLoadComplete(ResourceLoadInfo url_load_info); |
Luciano Pacheco | 8def47f | 2017-12-07 06:52:30 | [diff] [blame] | 443 | |
| 444 | // Sent when the frame changes its window.name. |
| 445 | DidChangeName(string name, string unique_name); |
| 446 | |
| 447 | // Sent when the frame starts enforcing an insecure request policy. Sending |
| 448 | // this information in DidCommitProvisionalLoad isn't sufficient; this |
| 449 | // message is needed because, for example, a document can dynamically insert |
| 450 | // a <meta> tag that causes strict mixed content checking to be enforced. |
| 451 | // |
| 452 | // Argument |policy_bitmap| represents blink::WebInsecureRequestPolicy uint8 |
| 453 | // bitfield. |
| 454 | EnforceInsecureRequestPolicy(uint8 policy_bitmap); |
arthursonzogni | 4b62a5cb | 2018-01-17 14:14:26 | [diff] [blame] | 455 | // Elements of |set| are hashes of hosts to upgrade. |
| 456 | EnforceInsecureNavigationsSet(array<uint32> set); |
Luciano Pacheco | 8def47f | 2017-12-07 06:52:30 | [diff] [blame] | 457 | |
| 458 | // Notifies the browser process that HTTP headers which affect the frame |
| 459 | // polices were delivered with the document being loaded into the frame. This |
| 460 | // can be either or both of 'Feature-Policy' or 'Content-Security-Policy' ( |
| 461 | // which can set sandbox flags). |
| 462 | // |
| 463 | // |parsed_header| is a list of an origin whitelist for each feature in the |
| 464 | // policy. |
| 465 | DidSetFramePolicyHeaders( |
| 466 | blink.mojom.WebSandboxFlags sandbox_flags, |
| 467 | array<blink.mojom.ParsedFeaturePolicyDeclaration> parsed_header); |
Austin Tankiang | 10d6483 | 2017-12-20 02:43:55 | [diff] [blame] | 468 | |
| 469 | // If a cross-process navigation was started for the initial history load in |
| 470 | // this subframe, this tries to cancel it to allow a client redirect to happen |
| 471 | // instead. |
| 472 | CancelInitialHistoryLoad(); |
| 473 | |
| 474 | // Change the encoding name of the page in UI when the page has detected |
| 475 | // proper encoding name. Sent for top-level frames. |
| 476 | UpdateEncoding(string encoding_name); |
Lucas Furukawa Gadani | e5d27a36 | 2018-02-13 14:26:02 | [diff] [blame] | 477 | |
Lucas Gadani | 471160f9 | 2018-03-01 03:13:21 | [diff] [blame] | 478 | // The frame's size is replicated in the browser so that the browser can |
| 479 | // correctly set the initial size of the frame in case of a cross-process |
| 480 | // navigation. |
| 481 | FrameSizeChanged(gfx.mojom.Size size); |
Becca Hughes | fd5d8f89 | 2018-06-14 18:23:36 | [diff] [blame] | 482 | |
| 483 | // Notifies the browser that the current frame has either become or is no |
| 484 | // longer fullscreen. |
| 485 | FullscreenStateChanged(bool is_fullscreen); |
Clark DuVall | a0e4299 | 2018-09-17 17:00:11 | [diff] [blame] | 486 | |
Dave Tapuska | d6703f91 | 2019-01-31 23:13:11 | [diff] [blame] | 487 | // Notifies the browser that the current frame has changed its visibility |
| 488 | // status. |
| 489 | VisibilityChanged(blink.mojom.FrameVisibility visibility); |
| 490 | |
Dave Tapuska | a42101f | 2019-06-28 17:12:50 | [diff] [blame] | 491 | // Notifies the browser that the current frame has changed its lifecycle |
| 492 | // state. |
| 493 | LifecycleStateChanged(blink.mojom.FrameLifecycleState state); |
| 494 | |
Clark DuVall | a0e4299 | 2018-09-17 17:00:11 | [diff] [blame] | 495 | // Updates information to determine whether a user gesture should carryover to |
| 496 | // future navigations. This is needed so navigations within a certain |
| 497 | // timeframe of a request initiated by a gesture will be treated as if they |
| 498 | // were initiated by a gesture too, otherwise the navigation may be blocked. |
| 499 | [EnableIf=is_android] |
| 500 | UpdateUserGestureCarryoverInfo(); |
Lowell Manners | 9499addc | 2019-03-12 11:05:32 | [diff] [blame] | 501 | |
| 502 | // Sent after the onload handler has been invoked for the document |
| 503 | // in this frame. Sent for top-level frames. |
| 504 | DocumentOnLoadCompleted(); |
Alexander Timin | 50be449 | 2019-04-17 23:07:59 | [diff] [blame] | 505 | |
| 506 | // Sent by the blink's FrameScheduler when a list of active features |
| 507 | // the scheduler tracks changes. |
| 508 | // See blink::scheduler::SchedulingPolicy::Feature for the meaning |
| 509 | // of the individual bits. |
| 510 | // TODO(altimin): Move into a separate scheduling interface. |
| 511 | UpdateActiveSchedulerTrackedFeatures(uint64 features_mask); |
Lowell Manners | f03ea5a | 2019-04-23 11:47:58 | [diff] [blame] | 512 | |
| 513 | // Blink and JavaScript error messages to log to the console or debugger UI. |
| 514 | DidAddMessageToConsole( |
| 515 | blink.mojom.ConsoleMessageLevel log_level, |
| 516 | mojo_base.mojom.BigString16 msg, |
| 517 | int32 line_number, |
| 518 | mojo_base.mojom.String16 source_id); |
| 519 | |
Lowell Manners | c39e5827 | 2019-05-20 15:46:38 | [diff] [blame] | 520 | // Sent when the renderer fails a provisional load with an error. |
| 521 | // |
| 522 | // |url| is the URL that the error is reported for. |
| 523 | // |
| 524 | // |error_code| is a net::Error code as reported in the |
| 525 | // DidFailProvisionalLoad callback. |
| 526 | // |
| 527 | // |error_description| is an error message generated from the error_code. |
| 528 | // This can be an empty string if we were unable to find a meaningful |
| 529 | // description. |
| 530 | // |
| 531 | // |showing_repost_interstitial| is true if the failure is the result of |
| 532 | // navigating to a POST again and we're going to show the POST interstitial. |
| 533 | // TODO(https://crbug.com/963806): Delete this method. |
| 534 | DidFailProvisionalLoadWithError( |
| 535 | url.mojom.Url url, |
| 536 | int32 error_code, |
| 537 | mojo_base.mojom.String16 error_description, |
| 538 | bool showing_repost_interstitial); |
| 539 | |
| 540 | // Sent when the renderer fails to load with an error. |
| 541 | DidFailLoadWithError( |
| 542 | url.mojom.Url url, |
| 543 | int32 error_code, |
| 544 | mojo_base.mojom.String16 error_description); |
Lowell Manners | 07a8cac | 2019-06-04 16:48:07 | [diff] [blame] | 545 | |
| 546 | // Sent to the browser process to transfer the user activation state from the |
| 547 | // source frame to the frame sending this IPC. The browser will update the |
| 548 | // user activation state of the frames in the frame tree in the non-source and |
| 549 | // non-target renderer processes. |
| 550 | TransferUserActivationFrom(int32 source_routing_id); |
Lowell Manners | 88da5ec | 2019-06-18 09:46:17 | [diff] [blame] | 551 | |
| 552 | // Causes a window previously opened via RenderMessageFilter::CreateNewWindow |
| 553 | // to be shown on the screen. This message is routed to the preexisting frame |
| 554 | // that opened the window, and |pending_widget_routing_id| corresponds to the |
| 555 | // widget routing id from the CreateNewWindow reply. |
| 556 | ShowCreatedWindow(int32 pending_widget_routing_id, |
| 557 | ui.mojom.WindowOpenDisposition disposition, |
| 558 | gfx.mojom.Rect rect, bool opened_by_user_gesture); |
Lowell Manners | a953038 | 2019-08-01 09:46:57 | [diff] [blame] | 559 | |
| 560 | // Sent by the renderer when the frame becomes focused. |
| 561 | FrameFocused(); |
Hajime Hoshi | a2f6803 | 2019-08-05 13:22:38 | [diff] [blame] | 562 | |
| 563 | // Evicts the page from the back/forward cache due to e.g., JavaScript |
| 564 | // execution. |
| 565 | EvictFromBackForwardCache(); |
ben | 76f52b24 | 2016-06-18 05:42:48 | [diff] [blame] | 566 | }; |