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

Issue 1086283002: Track frame openers in FrameTreeNodes instead of WebContents (Closed)

Created:
5 years, 8 months ago by alexmos
Modified:
5 years, 6 months ago
CC:
chromium-reviews, creis+watch_chromium.org, darin-cc_chromium.org, jam, nasko+codewatch_chromium.org, site-isolation-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Track frame openers in FrameTreeNodes instead of WebContents. This CL is the first step of refactoring frame openers to support out-of-process iframes: - Frame openers are now tracked by FrameTreeNodes rather than WebContents. Openers can point to subframes, and this change ensures that a cross-process opener can be properly used for things like navigation or postMessage. As part of this, the logic for clearing an opener when it is destroyed also moved into FrameTreeNode, where it uses a new Observer. - Various renderer->browser opener plumbing is refactored to use RenderFrameHosts instead of RenderViewHosts, which enables a newly created WebContents (or rather, its main frame) to track a subframe opener in the browser process. Future CLs will add support to further propagate per-frame opener information to a new window's renderer process, so that window.opener points to the right RenderFrameProxy in the cross-process case. Note that a subframe does not have an opener when it is created. The only way for it to gain an opener is if it is targeted by window.open(). Support for this will be added in a future CL. BUG=225940, 431769 Committed: https://crrev.com/e201c7cd1473ee1ff5b677bea1d3eb80c6680ed3 Cr-Commit-Position: refs/heads/master@{#333751}

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : Rebase #

Patch Set 4 : Rebase #

Patch Set 5 : #

Patch Set 6 : Rebase to pick up opener CL for allowed blocked popups #

Patch Set 7 : Fix Android build #

Patch Set 8 : Cleanup #

Patch Set 9 : Cleanup in WebContentsImpl #

Total comments: 39

Patch Set 10 : Rebase #

Patch Set 11 : Address Charlie's comments #

Total comments: 6

Patch Set 12 : Rebase #

Patch Set 13 : Second round of feedback #

Unified diffs Side-by-side diffs Delta from patch set Stats (+228 lines, -112 lines) Patch
M android_webview/browser/aw_content_browser_client.h View 1 2 3 4 5 6 1 chunk +2 lines, -1 line 0 comments Download
M android_webview/browser/aw_content_browser_client.cc View 1 2 3 4 5 6 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/chrome_content_browser_client.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/chrome_content_browser_client.cc View 1 2 3 4 5 6 7 8 9 10 11 5 chunks +17 lines, -14 lines 0 comments Download
M chrome/browser/ui/blocked_content/blocked_window_params.h View 1 2 3 4 5 6 7 8 3 chunks +10 lines, -10 lines 0 comments Download
M chrome/browser/ui/blocked_content/blocked_window_params.cc View 1 2 3 4 5 6 2 chunks +2 lines, -2 lines 0 comments Download
M chromecast/browser/cast_content_browser_client.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +2 lines, -1 line 0 comments Download
M chromecast/browser/cast_content_browser_client.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +2 lines, -1 line 0 comments Download
M content/browser/browser_plugin/browser_plugin_guest.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -1 line 0 comments Download
M content/browser/frame_host/frame_tree_browsertest.cc View 1 2 3 4 5 6 7 8 1 chunk +31 lines, -0 lines 0 comments Download
M content/browser/frame_host/frame_tree_node.h View 1 2 3 4 5 6 7 8 9 10 11 12 6 chunks +35 lines, -0 lines 0 comments Download
M content/browser/frame_host/frame_tree_node.cc View 1 2 3 4 5 6 7 8 9 10 4 chunks +47 lines, -0 lines 0 comments Download
M content/browser/frame_host/render_frame_host_delegate.h View 1 2 3 4 5 6 7 1 chunk +0 lines, -4 lines 0 comments Download
M content/browser/frame_host/render_frame_host_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +17 lines, -3 lines 0 comments Download
M content/browser/renderer_host/render_message_filter.cc View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/web_contents/web_contents_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 6 chunks +4 lines, -14 lines 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 11 chunks +35 lines, -46 lines 0 comments Download
M content/public/browser/content_browser_client.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +2 lines, -1 line 0 comments Download
M content/public/browser/content_browser_client.cc View 1 2 3 4 5 6 1 chunk +2 lines, -1 line 0 comments Download
M content/public/browser/web_contents.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +5 lines, -3 lines 0 comments Download
M content/public/browser/web_contents.cc View 1 2 3 4 5 6 7 8 9 10 3 chunks +5 lines, -2 lines 0 comments Download
M content/test/test_web_contents.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +2 lines, -1 line 0 comments Download
M content/test/test_web_contents.cc View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +2 lines, -5 lines 0 comments Download

Messages

Total messages: 18 (3 generated)
alexmos
Hey Charlie, can you please review this CL for me? This is the first step ...
5 years, 6 months ago (2015-06-01 17:44:55 UTC) #2
alexmos
And, I forgot to take the "DRAFT" out of the title - sorry about that ...
5 years, 6 months ago (2015-06-01 18:02:26 UTC) #3
Charlie Reis
Nice! Some comments below, but I think it's in pretty good shape. https://codereview.chromium.org/1086283002/diff/160001/chrome/browser/chrome_content_browser_client.cc File chrome/browser/chrome_content_browser_client.cc ...
5 years, 6 months ago (2015-06-03 20:01:37 UTC) #4
alexmos
https://codereview.chromium.org/1086283002/diff/160001/chrome/browser/chrome_content_browser_client.cc File chrome/browser/chrome_content_browser_client.cc (right): https://codereview.chromium.org/1086283002/diff/160001/chrome/browser/chrome_content_browser_client.cc#newcode504 chrome/browser/chrome_content_browser_client.cc:504: tab->GetRenderViewHost() != render_frame_host->GetRenderViewHost()) On 2015/06/03 20:01:36, Charlie Reis wrote: ...
5 years, 6 months ago (2015-06-05 22:34:32 UTC) #5
Charlie Reis
LGTM with some small changes, and possibly one preliminary change to WebContents::FromRenderFrameHost. https://codereview.chromium.org/1086283002/diff/160001/chrome/browser/chrome_content_browser_client.cc File chrome/browser/chrome_content_browser_client.cc ...
5 years, 6 months ago (2015-06-09 04:38:38 UTC) #6
alexmos
Thanks! Comments addressed, apart from the FromRenderFrameHost change, which we decided to keep here. We'll ...
5 years, 6 months ago (2015-06-09 20:13:05 UTC) #7
Charlie Reis
Yeah, let's investigate the FromRFH thing separately. LGTM.
5 years, 6 months ago (2015-06-09 20:15:08 UTC) #8
alexmos
Adding OWNERS: sgurun@: please review android_webview/ jochen@: please review chrome/ gunsch@: please review chromecast/
5 years, 6 months ago (2015-06-09 20:20:09 UTC) #10
gunsch
chromecast rs lgtm
5 years, 6 months ago (2015-06-09 20:27:27 UTC) #11
gunsch
chromecast rs lgtm
5 years, 6 months ago (2015-06-09 20:27:27 UTC) #12
sgurun-gerrit only
On 2015/06/09 20:27:27, gunsch wrote: > chromecast rs lgtm aw lgtm
5 years, 6 months ago (2015-06-09 21:10:51 UTC) #13
jochen (gone - plz use gerrit)
lgtm
5 years, 6 months ago (2015-06-10 08:34:38 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1086283002/240001
5 years, 6 months ago (2015-06-10 16:38:30 UTC) #16
commit-bot: I haz the power
Committed patchset #13 (id:240001)
5 years, 6 months ago (2015-06-10 17:14:27 UTC) #17
commit-bot: I haz the power
5 years, 6 months ago (2015-06-10 17:15:13 UTC) #18
Message was sent while issue was closed.
Patchset 13 (id:??) landed as
https://crrev.com/e201c7cd1473ee1ff5b677bea1d3eb80c6680ed3
Cr-Commit-Position: refs/heads/master@{#333751}

Powered by Google App Engine
This is Rietveld 408576698