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 | |
Arthur Hemery | 7b67a97 | 2017-12-01 15:24:49 | [diff] [blame] | 7 | import "content/common/navigation_params.mojom"; |
Kinuko Yasuda | ba38408 | 2018-01-11 08:30:16 | [diff] [blame] | 8 | import "content/common/service_worker/controller_service_worker.mojom"; |
Ken Rockot | be87ab32 | 2017-11-02 19:40:23 | [diff] [blame] | 9 | import "content/common/url_loader_factory_bundle.mojom"; |
John Abd-El-Malek | d488264 | 2017-12-04 21:45:19 | [diff] [blame] | 10 | import "content/public/common/resource_type.mojom"; |
Jay Civelli | 116683f | 2018-03-27 19:56:23 | [diff] [blame] | 11 | import "content/public/common/resource_load_info.mojom"; |
John Abd-El-Malek | ecc6f5f | 2018-03-02 18:47:39 | [diff] [blame] | 12 | import "content/public/common/transferrable_url_loader.mojom"; |
csharrison | 95f01e92 | 2017-04-24 18:52:35 | [diff] [blame] | 13 | import "content/public/common/window_container_type.mojom"; |
Ken Rockot | 8b447d7 | 2018-02-03 20:30:47 | [diff] [blame] | 14 | import "mojo/public/mojom/base/string16.mojom"; |
Oksana Zhuravlova | 34579e91 | 2018-03-23 00:18:49 | [diff] [blame] | 15 | import "mojo/public/mojom/base/unguessable_token.mojom"; |
Ken Rockot | 54311e6 | 2018-02-10 19:01:52 | [diff] [blame] | 16 | import "services/network/public/mojom/url_loader.mojom"; |
Ken Rockot | 543f5e3 | 2018-02-04 02:13:50 | [diff] [blame] | 17 | import "services/service_manager/public/mojom/interface_provider.mojom"; |
Jennifer Apacible | c45fd05 | 2018-02-25 12:04:55 | [diff] [blame] | 18 | import "services/viz/public/interfaces/compositing/surface_id.mojom"; |
Blink Reformat | a30d423 | 2018-04-07 15:31:06 | [diff] [blame] | 19 | import "third_party/blink/public/mojom/blob/blob_url_store.mojom"; |
| 20 | import "third_party/blink/public/mojom/feature_policy/feature_policy.mojom"; |
| 21 | import "third_party/blink/public/platform/referrer.mojom"; |
| 22 | import "third_party/blink/public/web/commit_result.mojom"; |
| 23 | import "third_party/blink/public/web/window_features.mojom"; |
csharrison | 95f01e92 | 2017-04-24 18:52:35 | [diff] [blame] | 24 | import "ui/base/mojo/window_open_disposition.mojom"; |
Daniel Cheng | 7a059b0 | 2018-02-03 10:04:13 | [diff] [blame] | 25 | import "url/mojom/url.mojom"; |
Luciano Pacheco | 8528c16f | 2017-12-14 07:10:56 | [diff] [blame] | 26 | import "ui/gfx/geometry/mojo/geometry.mojom"; |
ben | 76f52b24 | 2016-06-18 05:42:48 | [diff] [blame] | 27 | |
ben | 275a565 | 2016-10-28 16:55:50 | [diff] [blame] | 28 | // The name of the InterfaceProviderSpec in service manifests used by the |
| 29 | // frame tree to expose frame-specific interfaces between renderer and browser. |
| 30 | const string kNavigation_FrameSpec = "navigation:frame"; |
| 31 | |
ben | 76f52b24 | 2016-06-18 05:42:48 | [diff] [blame] | 32 | // Implemented by the frame provider (e.g. renderer processes). |
| 33 | interface Frame { |
rockot | 400ea35b | 2016-10-15 19:15:32 | [diff] [blame] | 34 | GetInterfaceProvider(service_manager.mojom.InterfaceProvider& interfaces); |
Daniel Cheng | 118f9e28 | 2017-11-10 03:28:44 | [diff] [blame] | 35 | GetCanonicalUrlForSharing() => (url.mojom.Url? canonical_url); |
Luciano Pacheco | 8528c16f | 2017-12-14 07:10:56 | [diff] [blame] | 36 | |
| 37 | // Samsung Galaxy Note-specific "smart clip" stylus text getter. |
| 38 | // Extracts the data at the given rect. |
Eve Martin-Jones | 40f552c | 2018-02-14 22:47:32 | [diff] [blame] | 39 | [EnableIf=is_android] |
Luciano Pacheco | 8528c16f | 2017-12-14 07:10:56 | [diff] [blame] | 40 | ExtractSmartClipData(gfx.mojom.Rect rect) |
Ken Rockot | 8b447d7 | 2018-02-03 20:30:47 | [diff] [blame] | 41 | => (mojo_base.mojom.String16 text, mojo_base.mojom.String16 html); |
ben | 76f52b24 | 2016-06-18 05:42:48 | [diff] [blame] | 42 | }; |
| 43 | |
Ken Rockot | 4878545 | 2017-10-25 19:33:14 | [diff] [blame] | 44 | // See src/content/common/navigation_params.h |
| 45 | [Native] |
| 46 | struct CommonNavigationParams; |
| 47 | |
| 48 | // See src/content/common/navigation_params.h |
| 49 | [Native] |
| 50 | struct RequestNavigationParams; |
| 51 | |
| 52 | // Implemented by the frame provider and currently must be associated with the |
| 53 | // legacy IPC channel. |
| 54 | interface FrameNavigationControl { |
arthursonzogni | 3a4ca9f | 2017-12-07 17:58:34 | [diff] [blame] | 55 | // Tells the renderer that a navigation is ready to commit. |
| 56 | // |
arthursonzogni | f34adf09 | 2018-04-24 17:06:13 | [diff] [blame^] | 57 | // The renderer should bind the |url_loader_client_endpoints| to an |
| 58 | // URLLoaderClient implementation to continue loading the document that will |
| 59 | // be the result of the committed navigation. |
arthursonzogni | 3a4ca9f | 2017-12-07 17:58:34 | [diff] [blame] | 60 | // |
arthursonzogni | f34adf09 | 2018-04-24 17:06:13 | [diff] [blame^] | 61 | // Note: |url_loader_client_endpoints| will be empty iff the navigation URL |
| 62 | // wasn't handled by the network stack (i.e. JavaScript URLs, renderer debug |
| 63 | // URLs, same document navigations, about:blank, ...) |
arthursonzogni | 3a4ca9f | 2017-12-07 17:58:34 | [diff] [blame] | 64 | // |
| 65 | // When the Network Service is enabled, |subresource_loader_factories| may |
| 66 | // also be provided by the browser as a a means for the renderer to load |
| 67 | // subresources where applicable. |
Pavel Feldman | f20fc9d | 2017-11-17 09:13:30 | [diff] [blame] | 68 | // |
arthursonzogni | b950d90 | 2018-02-08 09:27:13 | [diff] [blame] | 69 | // |controller_service_worker_info| may also be provided by the browser if the |
| 70 | // frame that is being navigated is supposed to be controlled by a Service |
| 71 | // Worker. |
Kinuko Yasuda | ba38408 | 2018-01-11 08:30:16 | [diff] [blame] | 72 | // |
Pavel Feldman | f20fc9d | 2017-11-17 09:13:30 | [diff] [blame] | 73 | // For automation driver-initiated navigations over the devtools protocol, |
| 74 | // |devtools_navigation_token_| is used to tag the navigation. This navigation |
| 75 | // token is then sent into the renderer and lands on the DocumentLoader. That |
| 76 | // way subsequent Blink-level frame lifecycle events can be associated with |
| 77 | // the concrete navigation. |
| 78 | // - The value should not be sent back to the browser. |
| 79 | // - The value on DocumentLoader may be generated in the renderer in some |
| 80 | // cases, and thus shouldn't be trusted. |
| 81 | // TODO(crbug.com/783506): Replace devtools navigation token with the generic |
| 82 | // navigation token that can be passed from renderer to the browser. |
arthursonzogni | 3a4ca9f | 2017-12-07 17:58:34 | [diff] [blame] | 83 | CommitNavigation( |
John Abd-El-Malek | b165dc5 | 2018-01-18 17:12:18 | [diff] [blame] | 84 | network.mojom.URLResponseHead head, |
arthursonzogni | 3a4ca9f | 2017-12-07 17:58:34 | [diff] [blame] | 85 | CommonNavigationParams common_params, |
| 86 | RequestNavigationParams request_params, |
John Abd-El-Malek | b165dc5 | 2018-01-18 17:12:18 | [diff] [blame] | 87 | network.mojom.URLLoaderClientEndpoints? url_loader_client_endpoints, |
arthursonzogni | 3a4ca9f | 2017-12-07 17:58:34 | [diff] [blame] | 88 | URLLoaderFactoryBundle? subresource_loader_factories, |
John Abd-El-Malek | ecc6f5f | 2018-03-02 18:47:39 | [diff] [blame] | 89 | array<TransferrableURLLoader>? subresource_overrides, |
Kinuko Yasuda | ba38408 | 2018-01-11 08:30:16 | [diff] [blame] | 90 | ControllerServiceWorkerInfo? controller_service_worker_info, |
Oksana Zhuravlova | 34579e91 | 2018-03-23 00:18:49 | [diff] [blame] | 91 | mojo_base.mojom.UnguessableToken devtools_navigation_token); |
Doug Turner | 84693be | 2017-12-19 00:18:46 | [diff] [blame] | 92 | |
| 93 | // Tells the renderer that a failed navigation is ready to commit. |
| 94 | // |
| 95 | // The result of this commit usually results in displaying an error page. |
| 96 | // Note |error_page_content| may contain the content of the error page |
| 97 | // (i.e. flattened HTML, JS, CSS). |
| 98 | // |
| 99 | // When the Network Service is enabled, |subresource_loader_factories| may |
Conley Owens | 7a78fab | 2018-03-10 06:27:49 | [diff] [blame] | 100 | // 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] | 101 | // subresources where applicable. |
| 102 | CommitFailedNavigation( |
| 103 | CommonNavigationParams common_params, |
| 104 | RequestNavigationParams request_params, |
| 105 | bool has_stale_copy_in_cache, |
| 106 | int32 error_code, |
| 107 | string? error_page_content, |
| 108 | URLLoaderFactoryBundle? subresource_loader_factories); |
Chong Zhang | 7306b0b | 2018-01-24 05:59:24 | [diff] [blame] | 109 | |
clamy | af4bf2d9 | 2018-02-06 10:54:36 | [diff] [blame] | 110 | // Tells the renderer that a same-document navigation should be committed. |
| 111 | // The renderer will return a status value indicating whether the commit |
| 112 | // could proceed as expected or not. In particular, it might be necessary to |
| 113 | // restart the navigation if it is no-longer same-document, which can happen |
| 114 | // if the renderer committed another navigation in the meantime. |
| 115 | CommitSameDocumentNavigation( |
| 116 | CommonNavigationParams common_params, |
| 117 | RequestNavigationParams request_params) |
| 118 | => (blink.mojom.CommitResult commit_result); |
| 119 | |
clamy | b1df7b96 | 2018-02-01 17:38:17 | [diff] [blame] | 120 | // Asks the renderer to handle a renderer-debug URL. |
| 121 | HandleRendererDebugURL(url.mojom.Url url); |
| 122 | |
Chong Zhang | 7306b0b | 2018-01-24 05:59:24 | [diff] [blame] | 123 | // Provides the renderer an updated |subresource_loader_factories|. |
| 124 | // |
| 125 | // This method is intended to fix broken loaders after a Network Service |
| 126 | // crash, and is only used when Network Service is enabled. |
| 127 | // |
| 128 | // The new bundle contains replacement factories for a subset of the |
| 129 | // receiver's existing bundle. |
| 130 | UpdateSubresourceLoaderFactories( |
| 131 | URLLoaderFactoryBundle subresource_loader_factories); |
Ken Rockot | 4878545 | 2017-10-25 19:33:14 | [diff] [blame] | 132 | }; |
| 133 | |
sammc | 7f6c6a0 | 2017-01-30 00:53:51 | [diff] [blame] | 134 | // Implemented by the frame (e.g. renderer processes). |
| 135 | // Instances of this interface must be associated with (i.e., FIFO with) the |
| 136 | // legacy IPC channel. |
| 137 | interface FrameBindingsControl { |
| 138 | // Used to tell a render frame whether it should expose various bindings |
| 139 | // that allow JS content extended privileges. See BindingsPolicy for valid |
| 140 | // flag values. |
| 141 | AllowBindings(int32 enabled_bindings_flags); |
| 142 | }; |
| 143 | |
ben | 76f52b24 | 2016-06-18 05:42:48 | [diff] [blame] | 144 | // Implemented by a service that provides implementations of the Frame |
| 145 | // interface. (e.g. renderer processes). |
| 146 | interface FrameFactory { |
Balazs Engedy | ba034e7 | 2017-10-27 22:26:28 | [diff] [blame] | 147 | CreateFrame(int32 frame_routing_id, Frame& frame); |
csharrison | 95f01e92 | 2017-04-24 18:52:35 | [diff] [blame] | 148 | }; |
| 149 | |
csharrison | 95f01e92 | 2017-04-24 18:52:35 | [diff] [blame] | 150 | struct CreateNewWindowParams { |
| 151 | // True if this open request came in the context of a user gesture. |
| 152 | bool user_gesture; |
| 153 | |
| 154 | // Type of window requested. |
| 155 | WindowContainerType window_container_type; |
| 156 | |
| 157 | // The session storage namespace ID this window should use. |
Daniel Murphy | 31bbb8b1 | 2018-02-07 21:44:10 | [diff] [blame] | 158 | string session_storage_namespace_id; |
csharrison | 95f01e92 | 2017-04-24 18:52:35 | [diff] [blame] | 159 | |
Daniel Murphy | e3eec92c | 2018-02-23 19:09:15 | [diff] [blame] | 160 | // The session storage namespace ID this window should clone from. |
| 161 | // TODO(dmurph): Remove this once session storage is fully mojo'd, as the |
| 162 | // clone call happens on a different interface. https://crbug.com/716490 |
| 163 | string clone_from_session_storage_namespace_id; |
| 164 | |
csharrison | 95f01e92 | 2017-04-24 18:52:35 | [diff] [blame] | 165 | // The name of the resulting frame that should be created (empty if none |
| 166 | // has been specified). UTF8 encoded string. |
| 167 | string frame_name; |
| 168 | |
csharrison | 95f01e92 | 2017-04-24 18:52:35 | [diff] [blame] | 169 | // Whether the opener will be suppressed in the new window, in which case |
| 170 | // scripting the new window is not allowed. |
| 171 | bool opener_suppressed; |
| 172 | |
| 173 | // Whether the window should be opened in the foreground, background, etc. |
| 174 | ui.mojom.WindowOpenDisposition disposition; |
| 175 | |
| 176 | // The URL that will be loaded in the new window (empty if none has been |
| 177 | // specified). |
| 178 | url.mojom.Url target_url; |
| 179 | |
| 180 | // The referrer that will be used to load |target_url| (empty if none has |
| 181 | // been specified). |
| 182 | blink.mojom.Referrer referrer; |
| 183 | |
| 184 | // The window features to use for the new window. |
| 185 | blink.mojom.WindowFeatures features; |
| 186 | }; |
| 187 | |
Daniel Cheng | 8bb30c6 | 2017-10-23 20:40:47 | [diff] [blame] | 188 | // Operation result when the renderer asks the browser to create a new window. |
| 189 | enum CreateNewWindowStatus { |
| 190 | // Ignore creation of the new window. This can happen because creation is |
| 191 | // blocked or because the new window should have no opener relationship. |
| 192 | kIgnore, |
| 193 | // Reuse the current window rather than creating a new window. |
| 194 | kReuse, |
| 195 | // Create a new window using the corresponding params in |reply|. |
| 196 | kSuccess, |
| 197 | }; |
| 198 | |
| 199 | // All routing IDs in this struct must be set to a valid routing ID. |
csharrison | 95f01e92 | 2017-04-24 18:52:35 | [diff] [blame] | 200 | struct CreateNewWindowReply { |
Daniel Cheng | 8bb30c6 | 2017-10-23 20:40:47 | [diff] [blame] | 201 | // The ID of the view to be created. |
csharrison | 95f01e92 | 2017-04-24 18:52:35 | [diff] [blame] | 202 | int32 route_id; |
| 203 | |
| 204 | // The ID of the main frame hosted in the view. |
| 205 | int32 main_frame_route_id; |
| 206 | |
| 207 | // The ID of the widget for the main frame. |
| 208 | int32 main_frame_widget_route_id; |
| 209 | |
Balazs Engedy | ba034e7 | 2017-10-27 22:26:28 | [diff] [blame] | 210 | // The InterfaceProvider through which the main RenderFrame can access |
| 211 | // services exposed by its RenderFrameHost. |
| 212 | service_manager.mojom.InterfaceProvider main_frame_interface_provider; |
| 213 | |
csharrison | 95f01e92 | 2017-04-24 18:52:35 | [diff] [blame] | 214 | // Duplicated from CreateNewWindowParams because legacy code. |
Daniel Murphy | 31bbb8b1 | 2018-02-07 21:44:10 | [diff] [blame] | 215 | string cloned_session_storage_namespace_id; |
Pavel Feldman | 08beed784 | 2017-10-17 19:18:11 | [diff] [blame] | 216 | |
| 217 | // Used for devtools instrumentation and trace-ability. The token is |
| 218 | // propagated to Blink's LocalFrame and both Blink and content/ |
| 219 | // can tag calls and requests with this instrumentation token in order to |
| 220 | // attribute them to the context frame. |
| 221 | // |devtools_frame_token| is only defined by the browser and is never |
| 222 | // sent back from the renderer in the control calls. |
Oksana Zhuravlova | 34579e91 | 2018-03-23 00:18:49 | [diff] [blame] | 223 | mojo_base.mojom.UnguessableToken devtools_main_frame_token; |
csharrison | 95f01e92 | 2017-04-24 18:52:35 | [diff] [blame] | 224 | }; |
| 225 | |
Yutaka Hirano | f7f2f63 | 2017-09-06 10:40:08 | [diff] [blame] | 226 | // An opaque handle that keeps alive the associated render process even after |
| 227 | // the frame is detached. Used by resource requests with "keepalive" specified. |
| 228 | interface KeepAliveHandle {}; |
| 229 | |
Balazs Engedy | a40712f | 2017-09-15 15:01:11 | [diff] [blame] | 230 | [Native] |
| 231 | struct DidCommitProvisionalLoadParams; |
| 232 | |
csharrison | 95f01e92 | 2017-04-24 18:52:35 | [diff] [blame] | 233 | // Implemented by the frame server (i.e. the browser process). For messages that |
| 234 | // must be associated with the IPC channel. |
| 235 | interface FrameHost { |
Daniel Cheng | 8bb30c6 | 2017-10-23 20:40:47 | [diff] [blame] | 236 | // Sent by the renderer to request the browser to create a new window. |reply| |
| 237 | // is only non-null on when status == CreateNewWindowStatus::kSuccess. |
csharrison | 95f01e92 | 2017-04-24 18:52:35 | [diff] [blame] | 238 | [Sync] CreateNewWindow(CreateNewWindowParams params) |
Daniel Cheng | 8bb30c6 | 2017-10-23 20:40:47 | [diff] [blame] | 239 | => (CreateNewWindowStatus status, CreateNewWindowReply? reply); |
Yutaka Hirano | f7f2f63 | 2017-09-06 10:40:08 | [diff] [blame] | 240 | |
| 241 | // Creates and returns a KeepAliveHandle. |
| 242 | IssueKeepAliveHandle(KeepAliveHandle& keep_alive_handle); |
Balazs Engedy | a40712f | 2017-09-15 15:01:11 | [diff] [blame] | 243 | |
| 244 | // Sent by the renderer when a navigation commits in the frame. |
Balazs Engedy | 0c8d550b | 2017-12-06 21:30:23 | [diff] [blame] | 245 | // |
| 246 | // If |interface_provider_request| is non-empty, the FrameHost implementation |
| 247 | // must unbind the old InterfaceProvider connection, and drop any interface |
| 248 | // requests pending on it. Then it should bind |interface_provider_request| |
| 249 | // and start servicing GetInterface messages coming in on this new connection |
| 250 | // in a security context that is appropriate for the committed navigation. |
| 251 | // |
| 252 | // The FrameHost implementation must enforce that |interface_provider_request| |
| 253 | // is set for cross-document navigations. This prevents origin confusion by |
| 254 | // ensuring that interface requests racing with navigation commit will be |
| 255 | // either ignored, or serviced correctly in the security context of the |
| 256 | // document they originated from (based on which InterfaceProvider connection |
| 257 | // the GetInterface messages arrive on). |
Balazs Engedy | a40712f | 2017-09-15 15:01:11 | [diff] [blame] | 258 | DidCommitProvisionalLoad( |
Balazs Engedy | 0c8d550b | 2017-12-06 21:30:23 | [diff] [blame] | 259 | DidCommitProvisionalLoadParams params, |
| 260 | service_manager.mojom.InterfaceProvider&? interface_provider_request); |
Arthur Hemery | 7b67a97 | 2017-12-01 15:24:49 | [diff] [blame] | 261 | |
Arthur Hemery | 7b0ae49 | 2018-02-05 16:04:45 | [diff] [blame] | 262 | // Sent by the renderer to indicate that a same document navigation |
| 263 | // committed in the renderer process. |
| 264 | DidCommitSameDocumentNavigation( |
| 265 | DidCommitProvisionalLoadParams params); |
| 266 | |
Arthur Hemery | 7b67a97 | 2017-12-01 15:24:49 | [diff] [blame] | 267 | // Sent by the renderer to request a navigation. |
Marijn Kruisselbrink | 07bf59d5 | 2018-04-03 21:50:25 | [diff] [blame] | 268 | // |blob_url_token| should be non-null when this is a navigation to a blob: |
| 269 | // URL. The token will then be used to look up the blob associated with the |
| 270 | // blob URL. Without this by the time the navigation code starts fetching |
| 271 | // the URL the blob URL might no longer be valid. |blob_url_token| is |
| 272 | // not part of BeginNavigationParams because that struct needs to be |
| 273 | // cloneable, and thus can't contain mojo interfaces. |
| 274 | // If an invalid BlobURLToken is passed in, or if the token doesn't match the |
| 275 | // url in |common_params|, the navigation will result in a network error. |
Arthur Hemery | 7b67a97 | 2017-12-01 15:24:49 | [diff] [blame] | 276 | BeginNavigation( |
| 277 | CommonNavigationParams common_params, |
Marijn Kruisselbrink | 07bf59d5 | 2018-04-03 21:50:25 | [diff] [blame] | 278 | BeginNavigationParams begin_params, |
| 279 | blink.mojom.BlobURLToken? blob_url_token); |
John Abd-El-Malek | d488264 | 2017-12-04 21:45:19 | [diff] [blame] | 280 | |
| 281 | // Sent when a subresource response has started. |
Jay Civelli | d5904f0 | 2018-03-23 19:43:57 | [diff] [blame] | 282 | // |cert_status| is the bitmask of status info of the SSL certificate. (see |
| 283 | // net/cert/cert_status_flags.h). |
| 284 | SubresourceResponseStarted(url.mojom.Url url, uint32 cert_status); |
| 285 | |
Jay Civelli | 116683f | 2018-03-27 19:56:23 | [diff] [blame] | 286 | // Sent when a resource load finished, successfully or not. |
| 287 | ResourceLoadComplete(ResourceLoadInfo url_load_info); |
Luciano Pacheco | 8def47f | 2017-12-07 06:52:30 | [diff] [blame] | 288 | |
| 289 | // Sent when the frame changes its window.name. |
| 290 | DidChangeName(string name, string unique_name); |
| 291 | |
| 292 | // Sent when the frame starts enforcing an insecure request policy. Sending |
| 293 | // this information in DidCommitProvisionalLoad isn't sufficient; this |
| 294 | // message is needed because, for example, a document can dynamically insert |
| 295 | // a <meta> tag that causes strict mixed content checking to be enforced. |
| 296 | // |
| 297 | // Argument |policy_bitmap| represents blink::WebInsecureRequestPolicy uint8 |
| 298 | // bitfield. |
| 299 | EnforceInsecureRequestPolicy(uint8 policy_bitmap); |
arthursonzogni | 4b62a5cb | 2018-01-17 14:14:26 | [diff] [blame] | 300 | // Elements of |set| are hashes of hosts to upgrade. |
| 301 | EnforceInsecureNavigationsSet(array<uint32> set); |
Luciano Pacheco | 8def47f | 2017-12-07 06:52:30 | [diff] [blame] | 302 | |
| 303 | // Notifies the browser process that HTTP headers which affect the frame |
| 304 | // polices were delivered with the document being loaded into the frame. This |
| 305 | // can be either or both of 'Feature-Policy' or 'Content-Security-Policy' ( |
| 306 | // which can set sandbox flags). |
| 307 | // |
| 308 | // |parsed_header| is a list of an origin whitelist for each feature in the |
| 309 | // policy. |
| 310 | DidSetFramePolicyHeaders( |
| 311 | blink.mojom.WebSandboxFlags sandbox_flags, |
| 312 | array<blink.mojom.ParsedFeaturePolicyDeclaration> parsed_header); |
Austin Tankiang | 10d6483 | 2017-12-20 02:43:55 | [diff] [blame] | 313 | |
| 314 | // If a cross-process navigation was started for the initial history load in |
| 315 | // this subframe, this tries to cancel it to allow a client redirect to happen |
| 316 | // instead. |
| 317 | CancelInitialHistoryLoad(); |
| 318 | |
| 319 | // Change the encoding name of the page in UI when the page has detected |
| 320 | // proper encoding name. Sent for top-level frames. |
| 321 | UpdateEncoding(string encoding_name); |
Lucas Furukawa Gadani | e5d27a36 | 2018-02-13 14:26:02 | [diff] [blame] | 322 | |
Lucas Gadani | 471160f9 | 2018-03-01 03:13:21 | [diff] [blame] | 323 | // The frame's size is replicated in the browser so that the browser can |
| 324 | // correctly set the initial size of the frame in case of a cross-process |
| 325 | // navigation. |
| 326 | FrameSizeChanged(gfx.mojom.Size size); |
Jennifer Apacible | c45fd05 | 2018-02-25 12:04:55 | [diff] [blame] | 327 | |
Jennifer Apacible | b1c9ca1 | 2018-04-12 07:49:38 | [diff] [blame] | 328 | // Sent by the renderer to update Picture-in-Picture with SurfaceId and video |
| 329 | // size to be used to show content in the Picture-in-Picture window. |
| 330 | OnUpdatePictureInPictureSurfaceId( |
| 331 | viz.mojom.SurfaceId surface_id, |
| 332 | gfx.mojom.Size natural_size); |
Jennifer Apacible | f6d55b1 | 2018-04-06 04:23:40 | [diff] [blame] | 333 | |
| 334 | // Sent by the renderer to signal that Picture-in-Picture mode has ended. |
| 335 | OnExitPictureInPicture(); |
ben | 76f52b24 | 2016-06-18 05:42:48 | [diff] [blame] | 336 | }; |