Move FrameMsg_NewFrame/NewFrameProxy to mojom
Straightforward conversion, no surprises.
Also changes some (re-)initialization details of RPHI. Namely:
* The mojom::RouteProvider and mojom::Renderer associated
interface proxies are acquired immediately upon Channel creation,
before pausing the Channel. This avoids an issue where one of
these interface requests could be lazily acquired during Channel
pause, blocking a subsequent message on that interface which
should be sent immediately while the Channel is unpaused.
See https://goo.gl/ot0S32 for some explanation of this behavior.
* Any cached associated interface proxies are reset in
ProcessDied() rather than Init(), per nasko@'s suggestion.
This clarifies that they are per-process state.
BUG=612500
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_site_isolation
Review-Url: https://codereview.chromium.org/2383853003
Cr-Commit-Position: refs/heads/master@{#422900}
diff --git a/content/common/renderer.mojom b/content/common/renderer.mojom
index da0f40af..80b1f2f 100644
--- a/content/common/renderer.mojom
+++ b/content/common/renderer.mojom
@@ -78,10 +78,74 @@
gfx.mojom.ICCProfile image_decode_color_space;
};
+struct CreateFrameWidgetParams {
+ // Gives the routing ID for the RenderWidget that will be attached to the
+ // new RenderFrame. If the RenderFrame does not need a RenderWidget, this
+ // is MSG_ROUTING_NONE and the other parameters are not read.
+ int32 routing_id;
+
+ // Tells the new RenderWidget whether it is initially hidden.
+ bool hidden;
+};
+
+struct CreateFrameParams {
+ // Specifies the routing ID of the new RenderFrame object.
+ int32 routing_id;
+
+ // If a valid |proxy_routing_id| is provided, the new frame will be
+ // configured to replace the proxy on commit.
+ int32 proxy_routing_id;
+
+ // Specifies the new frame's opener. The opener will be null if this is
+ // MSG_ROUTING_NONE.
+ int32 opener_routing_id;
+
+ // The new frame should be created as a child of the object
+ // identified by |parent_routing_id| or as top level if that is
+ // MSG_ROUTING_NONE.
+ int32 parent_routing_id;
+
+ // Identifies the previous sibling of the new frame, so that the new frame is
+ // inserted into the correct place in the frame tree. If this is
+ // MSG_ROUTING_NONE, the frame will be created as the leftmost child of its
+ // parent frame, in front of any other children.
+ int32 previous_sibling_routing_id;
+
+ // When the new frame has a parent, |replication_state| holds the new frame's
+ // properties replicated from the process rendering the parent frame, such as
+ // the new frame's sandbox flags.
+ FrameReplicationState replication_state;
+
+ // When the new frame has a parent, |frame_owner_properties| holds the
+ // properties of the HTMLFrameOwnerElement from the parent process.
+ // Note that unlike FrameReplicationState, this is not replicated for remote
+ // frames.
+ FrameOwnerProperties frame_owner_properties;
+
+ // Specifies properties for a new RenderWidget that will be attached to the
+ // new RenderFrame (if one is needed).
+ CreateFrameWidgetParams widget_params;
+};
+
+
// The primordial Channel-associated interface implemented by a render process.
// This should be used for implementing browser-to-renderer control messages
// which need to retain FIFO with respect to legacy IPC messages.
interface Renderer {
// Tells the renderer to create a new view.
CreateView(CreateViewParams params);
+
+ // Tells the renderer to create a new RenderFrame.
+ CreateFrame(CreateFrameParams params);
+
+ // Tells the renderer to create a new RenderFrameProxy object with
+ // |routing_id|. |render_view_routing_id| identifies the
+ // RenderView to be associated with this proxy. The new proxy's opener should
+ // be set to the object identified by |opener_routing_id|, or to null if that
+ // is MSG_ROUTING_NONE. The new proxy should be created as a child of the
+ // object identified by |parent_routing_id| or as top level if that is
+ // MSG_ROUTING_NONE.
+ CreateFrameProxy(int32 routing_id, int32 render_view_routing_id,
+ int32 opener_routing_id, int32 parent_routing_id,
+ FrameReplicationState replication_state);
};