Convert FrameMsg_CommitNavigation to mojom
Uses a Channel-associated interface to carry a new message mirroring
the contents of and replacing the legacy FrameMsg_CommitNavigation
IPC message.
This is a precursor to also sending a map of allowed protocol handler
URLLoaderFactoryPtrs to frames upon navigation, which would be much
more cumbersome using legacy IPC. This map will support things like
file URLs and any embedder-defined schemes (e.g. chrome-extension).
Bug: 759230,721414
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_site_isolation
Change-Id: I9a679e58f6424c95029ce1ac63cb9fca7f7644e8
Reviewed-on: https://chromium-review.googlesource.com/736855
Reviewed-by: John Abd-El-Malek <[email protected]>
Reviewed-by: Daniel Cheng <[email protected]>
Commit-Queue: Ken Rockot <[email protected]>
Cr-Commit-Position: refs/heads/master@{#511554}
diff --git a/content/common/frame.mojom b/content/common/frame.mojom
index b268df7..c402b91 100644
--- a/content/common/frame.mojom
+++ b/content/common/frame.mojom
@@ -4,6 +4,8 @@
module content.mojom;
+import "content/public/common/url_loader.mojom";
+import "content/public/common/url_loader_factory.mojom";
import "content/public/common/window_container_type.mojom";
import "mojo/common/unguessable_token.mojom";
import "services/service_manager/public/interfaces/interface_provider.mojom";
@@ -21,6 +23,31 @@
GetInterfaceProvider(service_manager.mojom.InterfaceProvider& interfaces);
};
+// See src/content/common/navigation_params.h
+[Native]
+struct CommonNavigationParams;
+
+// See src/content/common/navigation_params.h
+[Native]
+struct RequestNavigationParams;
+
+// Implemented by the frame provider and currently must be associated with the
+// legacy IPC channel.
+interface FrameNavigationControl {
+ // Tells the renderer that a navigation is ready to commit. The renderer
+ // should request |body_url| to get access to the stream containing the body
+ // of the response. When the Network Service is enabled, |body_url| is not
+ // used and instead the data is passed to the renderer via |body_data|. In
+ // that case |default_subresource_url_loader_factory| may also be provided by
+ // the browser as a means for the renderer to load subresources.
+ CommitNavigation(URLResponseHead head,
+ url.mojom.Url body_url,
+ CommonNavigationParams common_params,
+ RequestNavigationParams request_params,
+ handle<data_pipe_consumer>? body_data,
+ URLLoaderFactory? default_subresource_url_loader_factory);
+};
+
// Implemented by the frame (e.g. renderer processes).
// Instances of this interface must be associated with (i.e., FIFO with) the
// legacy IPC channel.