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

Unified Diff: content/browser/web_contents/web_contents_impl.cc

Issue 1141453003: Fix setting the top-level FrameTreeNode name for named windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixes based on Alex's review. Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | content/browser/web_contents/web_contents_impl_browsertest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/web_contents/web_contents_impl.cc
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index 8d60762d70c490a91d04af161250153c78f2d165..ed930379a66a3b8f3935c878d1d0a81355faf0d5 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -1204,6 +1204,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) {
GetRenderManager()->Init(
params.browser_context, params.site_instance, params.routing_id,
params.main_frame_routing_id);
+ frame_tree_.root()->SetFrameName(params.main_frame_name);
Charlie Reis 2015/05/12 23:45:24 Could anything in RFHM::Init ever depend on the na
nasko 2015/05/13 00:07:27 SetFrameName actually accesses render_manager_ and
WebContentsViewDelegate* delegate =
GetContentClient()->browser()->GetWebContentsViewDelegate(this);
@@ -1582,6 +1583,7 @@ void WebContentsImpl::CreateNewWindow(
CreateParams create_params(GetBrowserContext(), site_instance.get());
create_params.routing_id = route_id;
create_params.main_frame_routing_id = main_frame_route_id;
+ create_params.main_frame_name = base::UTF16ToUTF8(params.frame_name);
Charlie Reis 2015/05/12 23:45:24 Why do FrameTreeNode and FrameHostMsg_DidChangeNam
nasko 2015/05/13 00:07:27 Yeah, a separate CL will be fine. I tried doing it
create_params.opener = this;
create_params.opener_suppressed = params.opener_suppressed;
if (params.disposition == NEW_BACKGROUND_TAB)
« no previous file with comments | « no previous file | content/browser/web_contents/web_contents_impl_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698