Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2)

Issue 1202593002: Move browser-to-renderer opener plumbing to frame routing IDs (Closed)

Created:
5 years, 6 months ago by alexmos
Modified:
5 years, 5 months ago
Reviewers:
nasko
CC:
chromium-reviews, mlamouri+watch-content_chromium.org, creis+watch_chromium.org, nasko+codewatch_chromium.org, jam, darin-cc_chromium.org, mkwst+moarreviews-renderer_chromium.org, site-isolation-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@opener-create-opener-render-views
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Move browser-to-renderer opener plumbing to frame routing IDs. This CL allows a new RenderView to set its main frame's opener to any frame, rather than a top-level frame. I.e., it is now possible to use window.opener to refer to a cross-process subframe. Summary of changes: * The ViewMsg_New IPC now passes the opener's frame ID rather than view ID. RenderView::Initialize resolves this into the opener's WebFrame. * The flow of opener routing IDs from RFHM::InitRenderView to RenderViewHostImpl::CreateRenderView (which sends the IPC) is moved from view to frame IDs. * The passing of opener routing IDs from CreateOpenerProxies, etc., into RFHM::InitRenderView is removed. Instead, InitRenderView now looks up the proper opener frame routing ID itself. This is because (1) the previous flow would complicate implementing opener updates, which would allow subframes to have openers and FrameTrees to have more than one opener to traverse, and (2) previous plumbing missed some cases (e.g., creating swapped-out RVs via CreateRenderFrameProxy or CreateProxiesForSiteInstance), and fixing this would add more complexity. * There are paths where the opener chain is intentionally suppressed from a new RenderView, for example for <webview>: see WCI::CreateSwappedOutRenderView and EnsureOpenerProxiesExist. This is now supported via an explicit flag which is passed into InitRenderView rather than passing around MSG_ROUTING_NONE for the opener's routing ID. BUG=225940, 304341 Committed: https://crrev.com/5ac402d1ed5d323a9ea9223c2acf213b5dfc9aaa Cr-Commit-Position: refs/heads/master@{#337995}

Patch Set 1 #

Patch Set 2 : Rebase #

Patch Set 3 : Fix unit tests #

Patch Set 4 : Fix Android #

Patch Set 5 : Draft RV->RF ID conversion #

Patch Set 6 : Rebase #

Patch Set 7 : Rebase; add missing opener info to CreateRenderFrameProxy #

Patch Set 8 : Fix Android build #

Patch Set 9 : Use suppress_opener plumbing #

Patch Set 10 : Cleanup #

Patch Set 11 : More cleanup #

Total comments: 29

Patch Set 12 : Address Nasko's comments #

Patch Set 13 : Remove suppress_opener #

Unified diffs Side-by-side diffs Delta from patch set Stats (+218 lines, -152 lines) Patch
M content/browser/frame_host/frame_tree.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +2 lines, -2 lines 0 comments Download
M content/browser/frame_host/render_frame_host_manager.h View 1 2 3 4 5 6 7 8 9 10 11 12 6 chunks +21 lines, -24 lines 0 comments Download
M content/browser/frame_host/render_frame_host_manager.cc View 1 2 3 4 5 6 7 8 9 10 11 12 16 chunks +54 lines, -56 lines 0 comments Download
M content/browser/frame_host/render_frame_host_manager_unittest.cc View 1 2 3 4 5 6 1 chunk +3 lines, -3 lines 0 comments Download
M content/browser/renderer_host/render_view_host_impl.h View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M content/browser/renderer_host/render_view_host_impl.cc View 1 2 3 4 5 6 7 8 9 2 chunks +2 lines, -2 lines 0 comments Download
M content/browser/site_per_process_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +28 lines, -9 lines 0 comments Download
M content/browser/web_contents/web_contents_impl.h View 1 2 3 4 5 6 7 8 1 chunk +1 line, -1 line 0 comments Download
M content/browser/web_contents/web_contents_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 3 chunks +6 lines, -8 lines 0 comments Download
M content/browser/web_contents/web_contents_impl_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +17 lines, -6 lines 0 comments Download
M content/common/view_messages.h View 1 2 3 4 5 6 7 8 9 1 chunk +3 lines, -3 lines 0 comments Download
M content/public/test/render_view_test.cc View 1 2 3 4 5 2 chunks +1 line, -2 lines 0 comments Download
M content/public/test/test_renderer_host.h View 1 2 3 4 5 6 7 8 9 1 chunk +5 lines, -6 lines 0 comments Download
M content/renderer/render_view_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 4 chunks +52 lines, -10 lines 0 comments Download
M content/test/data/post_message.html View 1 2 3 4 5 6 1 chunk +6 lines, -0 lines 0 comments Download
M content/test/test_render_view_host.h View 1 2 3 4 5 2 chunks +6 lines, -6 lines 0 comments Download
M content/test/test_render_view_host.cc View 1 2 3 4 5 3 chunks +5 lines, -5 lines 0 comments Download
M content/test/test_web_contents.h View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M content/test/test_web_contents.cc View 1 2 3 4 5 6 7 8 9 1 chunk +4 lines, -7 lines 0 comments Download

Messages

Total messages: 13 (2 generated)
alexmos
Nasko, can you please take a look? This CL propagates opener frame information to new ...
5 years, 5 months ago (2015-07-06 23:56:42 UTC) #2
nasko
I'm actually super excited that we don't return routing ids from those creation functions anymore! ...
5 years, 5 months ago (2015-07-07 16:26:21 UTC) #3
alexmos
Thanks! Most comments addressed, plus some discussion on the pending RFH and the "false" parameters ...
5 years, 5 months ago (2015-07-08 04:42:18 UTC) #4
nasko
Another round of feedback. Once we resolve the <webview>/suppress opener question, I think it is ...
5 years, 5 months ago (2015-07-08 09:35:19 UTC) #5
alexmos
https://codereview.chromium.org/1202593002/diff/200001/content/browser/frame_host/render_frame_host_manager.cc File content/browser/frame_host/render_frame_host_manager.cc (right): https://codereview.chromium.org/1202593002/diff/200001/content/browser/frame_host/render_frame_host_manager.cc#newcode867 content/browser/frame_host/render_frame_host_manager.cc:867: frame_tree_node_->IsMainFrame(), false)) { > It isn't just InitRenderView that ...
5 years, 5 months ago (2015-07-08 15:09:27 UTC) #6
alexmos
https://codereview.chromium.org/1202593002/diff/200001/content/browser/frame_host/render_frame_host_manager.cc File content/browser/frame_host/render_frame_host_manager.cc (right): https://codereview.chromium.org/1202593002/diff/200001/content/browser/frame_host/render_frame_host_manager.cc#newcode867 content/browser/frame_host/render_frame_host_manager.cc:867: frame_tree_node_->IsMainFrame(), false)) { Thinking more about this, I think ...
5 years, 5 months ago (2015-07-09 02:43:23 UTC) #7
nasko
On 2015/07/09 02:43:23, alexmos wrote: > https://codereview.chromium.org/1202593002/diff/200001/content/browser/frame_host/render_frame_host_manager.cc > File content/browser/frame_host/render_frame_host_manager.cc (right): > > https://codereview.chromium.org/1202593002/diff/200001/content/browser/frame_host/render_frame_host_manager.cc#newcode867 > ...
5 years, 5 months ago (2015-07-09 07:46:23 UTC) #8
nasko
lgtm
5 years, 5 months ago (2015-07-09 07:46:34 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1202593002/240001
5 years, 5 months ago (2015-07-09 07:46:44 UTC) #11
commit-bot: I haz the power
Committed patchset #13 (id:240001)
5 years, 5 months ago (2015-07-09 07:51:20 UTC) #12
commit-bot: I haz the power
5 years, 5 months ago (2015-07-09 07:52:19 UTC) #13
Message was sent while issue was closed.
Patchset 13 (id:??) landed as
https://crrev.com/5ac402d1ed5d323a9ea9223c2acf213b5dfc9aaa
Cr-Commit-Position: refs/heads/master@{#337995}

Powered by Google App Engine
This is Rietveld 408576698