Plumb opener information when creating RenderFrames and
RenderFrameProxies for subframes.
Frame opener updates (via window.open) make it possible for subframes
to have an opener. Currently, when a subframe gains an opener, this
will be forwarded to the browser process and all of the renderer
processes where the subframe has a RenderFrame or a RenderFrameProxy.
Openers are also supposed to be preserved across cross-process frame
navigations. Currently, this is done correctly for top-level frames
(where opener information is sent as part of ViewMsg_New), but not for
subframes: FrameMsg_NewFrame and FrameMsg_NewFrameProxy currently
don't pass any information about the frame's opener.
For example, suppose a frame F1 has two subframes, F2 and F3, all at
site A. Suppose F1 executes a window.open('',F2_name) to update F2's
opener to F1. Now suppose F2 navigates to B. F2's frame in B should
have an opener that points to F1's proxy in B, but currently that's
not the case. Likewise, suppose F3 navigates to C. F2's proxy in C
should have an opener that points to F1's proxy in C.
This CL plumbs opener information through FrameMsg_NewFrame(Proxy) to
make these scenarios work correctly.
BUG=225940
Review URL: https://codereview.chromium.org/1312643002
Cr-Commit-Position: refs/heads/master@{#347072}
diff --git a/content/renderer/render_thread_impl.h b/content/renderer/render_thread_impl.h
index 0cfe620..e24f438 100644
--- a/content/renderer/render_thread_impl.h
+++ b/content/renderer/render_thread_impl.h
@@ -447,8 +447,9 @@
void OnCreateNewFrame(FrameMsg_NewFrame_Params params);
void OnCreateNewFrameProxy(int routing_id,
- int parent_routing_id,
int render_view_routing_id,
+ int opener_routing_id,
+ int parent_routing_id,
const FrameReplicationState& replicated_state);
void OnSetZoomLevelForCurrentURL(const std::string& scheme,
const std::string& host,