summaryrefslogtreecommitdiff
path: root/chromium/content/common/frame.mojom
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/content/common/frame.mojom')
-rw-r--r--chromium/content/common/frame.mojom120
1 files changed, 67 insertions, 53 deletions
diff --git a/chromium/content/common/frame.mojom b/chromium/content/common/frame.mojom
index 5dfb74713e4..40821a2c3d7 100644
--- a/chromium/content/common/frame.mojom
+++ b/chromium/content/common/frame.mojom
@@ -10,10 +10,10 @@ import "content/common/frame_messages.mojom";
import "content/common/native_types.mojom";
import "content/common/navigation_client.mojom";
import "content/common/navigation_params.mojom";
-import "content/common/widget.mojom";
import "content/public/common/browser_controls_state.mojom";
import "content/public/common/transferrable_url_loader.mojom";
import "content/public/common/window_container_type.mojom";
+import "mojo/public/mojom/base/file_path.mojom";
import "mojo/public/mojom/base/string16.mojom";
import "mojo/public/mojom/base/unguessable_token.mojom";
import "mojo/public/mojom/base/values.mojom";
@@ -38,11 +38,12 @@ import "third_party/blink/public/mojom/frame/navigation_initiator.mojom";
import "third_party/blink/public/mojom/loader/resource_load_info.mojom";
import "third_party/blink/public/mojom/loader/url_loader_factory_bundle.mojom";
import "third_party/blink/public/mojom/messaging/transferable_message.mojom";
+import "third_party/blink/public/mojom/page/page.mojom";
import "third_party/blink/public/mojom/page/widget.mojom";
import "third_party/blink/public/mojom/portal/portal.mojom";
import "third_party/blink/public/mojom/referrer.mojom";
import "third_party/blink/public/mojom/service_worker/controller_service_worker.mojom";
-import "third_party/blink/public/mojom/service_worker/service_worker_provider.mojom";
+import "third_party/blink/public/mojom/service_worker/service_worker_container.mojom";
import "third_party/blink/public/mojom/window_features/window_features.mojom";
import "ui/base/mojom/window_open_disposition.mojom";
import "ui/gfx/geometry/mojom/geometry.mojom";
@@ -53,6 +54,19 @@ import "url/mojom/url.mojom";
// frame tree to expose frame-specific interfaces between renderer and browser.
const string kNavigation_FrameSpec = "navigation:frame";
+// Provided with each call to Frame::GetSerializedHtmlWithLocalLinks() so that
+// the renderer can notify the browser process each time that a chunk of HTML
+// data gets serialized, as well as when the entire process is finished.
+interface FrameHTMLSerializerHandler {
+ // Sent by the renderer as a response to GetSerializedHtmlWithLocalLinks() to
+ // indicate that HTML data has been serialized, included in |data_buffer|.
+ DidReceiveData(string data_buffer);
+
+ // Reports that the serialization process is finished. It is expected to
+ // receive this message right after the last time DidReceiveData() is called.
+ Done();
+};
+
// Implemented by the frame provider (e.g. renderer processes).
interface Frame {
GetInterfaceProvider(
@@ -70,9 +84,6 @@ interface Frame {
// Cancels blocked requests. BlockRequests must have been called before.
CancelBlockedRequests();
- // Set the lifecycle state.
- SetLifecycleState(blink.mojom.FrameLifecycleState state);
-
// Samsung Galaxy Note-specific "smart clip" stylus text getter.
// Extracts the data at the given rect.
[EnableIf=is_android]
@@ -92,6 +103,17 @@ interface Frame {
// See ui/accessibility/ax_mode.h for valid values of |ax_mode|.
SnapshotAccessibilityTree(uint32 ax_mode)
=> (ax.mojom.AXContentTreeUpdate snapshot);
+
+ // Get HTML data by serializing the target frame and replacing all resource
+ // links with a path to the local copy passed in the message payload. In order
+ // to report progress to the the browser process, a pending remote is passed
+ // via |callback_remote|, so that direct communication with the SavePackage
+ // object that initiated the process can be established.
+ GetSerializedHtmlWithLocalLinks(
+ map<url.mojom.Url, mojo_base.mojom.FilePath> url_map,
+ map<mojo_base.mojom.UnguessableToken, mojo_base.mojom.FilePath>
+ frame_token_map, bool save_with_empty_url,
+ pending_remote<FrameHTMLSerializerHandler> handler_remote);
};
// Implemented by the frame provider and currently must be associated with the
@@ -99,52 +121,6 @@ interface Frame {
// KEEP THE COMMIT FUNCTIONS IN SYNC in content/common/navigation_client.mojom.
// These will eventually be removed from FrameNavigationControl.
interface FrameNavigationControl {
- // Tells the renderer that a navigation is ready to commit.
- //
- // The renderer should bind the |url_loader_client_endpoints| to an
- // URLLoaderClient implementation to continue loading the document that will
- // be the result of the committed navigation.
- //
- // Note: |url_loader_client_endpoints| will be empty iff the navigation URL
- // wasn't handled by the network stack (i.e. about:blank, ...)
- //
- // When the Network Service is enabled, |subresource_loader_factories| may
- // also be provided by the browser as a a means for the renderer to load
- // subresources where applicable.
- //
- // |controller_service_worker_info| may also be provided by the browser if the
- // frame that is being navigated is supposed to be controlled by a Service
- // Worker.
- // |provider_info| may also be provided if the browser has created a
- // ServiceWorkerProviderHost for this navigation.
- // |prefetch_loader_factory| is populated only when Network Service is
- // enabled. The pointer is used to start a prefetch loading via the browser
- // process.
- //
- // For automation driver-initiated navigations over the devtools protocol,
- // |devtools_navigation_token_| is used to tag the navigation. This navigation
- // token is then sent into the renderer and lands on the DocumentLoader. That
- // way subsequent Blink-level frame lifecycle events can be associated with
- // the concrete navigation.
- // - The value should not be sent back to the browser.
- // - The value on DocumentLoader may be generated in the renderer in some
- // cases, and thus shouldn't be trusted.
- // TODO(crbug.com/783506): Replace devtools navigation token with the generic
- // navigation token that can be passed from renderer to the browser.
- CommitNavigation(
- CommonNavigationParams common_params,
- CommitNavigationParams request_params,
- network.mojom.URLResponseHead response_head,
- handle<data_pipe_consumer>? response_body,
- network.mojom.URLLoaderClientEndpoints? url_loader_client_endpoints,
- blink.mojom.URLLoaderFactoryBundle? subresource_loader_factories,
- array<TransferrableURLLoader>? subresource_overrides,
- blink.mojom.ControllerServiceWorkerInfo? controller_service_worker_info,
- blink.mojom.ServiceWorkerProviderInfoForClient? provider_info,
- pending_remote<network.mojom.URLLoaderFactory>? prefetch_loader_factory,
- mojo_base.mojom.UnguessableToken devtools_navigation_token)
- => (blink.mojom.CommitResult commit_result);
-
// Tells the renderer that a same-document navigation should be committed.
// The renderer will return a status value indicating whether the commit
// could proceed as expected or not. In particular, it might be necessary to
@@ -338,6 +314,9 @@ struct CreateNewWindowReply {
pending_associated_remote<blink.mojom.WidgetHost> widget_host;
pending_associated_receiver<blink.mojom.Widget> widget;
+ // The communication interfaces for the PageBroadcast.
+ pending_associated_receiver<blink.mojom.PageBroadcast> page_broadcast;
+
DocumentScopedInterfaceBundle main_frame_interface_bundle;
// Duplicated from CreateNewWindowParams because legacy code.
@@ -357,6 +336,35 @@ struct CreateNewWindowReply {
bool wait_for_debugger;
};
+[Native]
+enum TriggeringEventInfo;
+
+// This struct holds parameters included in the OpenURL method sent by the
+// renderer to the browser, |is_history_navigation_in_new_child_frame| is true
+// in the case that the browser process should look for an existing history item
+// for the frame.
+struct OpenURLParams {
+ // The main URL to open.
+ url.mojom.Url url;
+ url.mojom.Origin initiator_origin;
+ int32 initiator_routing_id;
+ network.mojom.URLRequestBody? post_body;
+ string extra_headers;
+ blink.mojom.Referrer referrer;
+
+ // The window position to open the URL.
+ ui.mojom.WindowOpenDisposition disposition;
+ bool should_replace_current_entry;
+ bool user_gesture;
+
+ // Extra information about the triggering of the OpenURL.
+ TriggeringEventInfo triggering_event_info;
+ handle<message_pipe>? blob_url_token;
+ string href_translate;
+ Impression? impression;
+ NavigationDownloadPolicy download_policy;
+};
+
// An opaque handle that keeps alive the associated render process even after
// the frame is detached. Used by resource requests with "keepalive" specified.
interface KeepAliveHandle {};
@@ -406,13 +414,13 @@ interface FrameHost {
// Similar to CreateNewWindow, except used for sub-widgets, like <select>
// dropdowns.
- [Sync] CreateNewWidget(pending_remote<Widget> widget,
+ [Sync] CreateNewWidget(
pending_associated_receiver<blink.mojom.WidgetHost> blink_widget_host,
pending_associated_remote<blink.mojom.Widget> blink_widget)
=> (int32 routing_id);
// Similar to CreateNewWidget except the widget is a full screen window.
- [Sync] CreateNewFullscreenWidget(pending_remote<Widget> widget,
+ [Sync] CreateNewFullscreenWidget(
pending_associated_receiver<blink.mojom.WidgetHost> blink_widget_host,
pending_associated_remote<blink.mojom.Widget> blink_widget)
=> (int32 routing_id);
@@ -533,4 +541,10 @@ interface FrameHost {
// Requests an overlay routing token.
RequestOverlayRoutingToken() => (mojo_base.mojom.UnguessableToken token);
+
+ // Notifies the browser that this frame has new session history information.
+ UpdateState(PageState state);
+
+ // Requests that the given URL be opened in the specified manner.
+ OpenURL(OpenURLParams params);
};