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

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

Issue 1635873003: Replicating WebFrame::uniqueName across renderers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@dump-render-tree3
Patch Set: Added FrameTreeHelpers::createLocalChild. Created 4 years, 10 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
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 add65dbbb4a8134dc4580df79b873b6d67acd4ae..a4ec21d76d0036f9d9b541bdc671b7930530cd57 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -1366,7 +1366,11 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) {
GetRenderManager()->Init(site_instance.get(), view_routing_id,
params.main_frame_routing_id,
main_frame_widget_routing_id);
- frame_tree_.root()->SetFrameName(params.main_frame_name);
+
+ // blink::FrameTree::setName uses |name| as the |unique_name| for the main
+ // frame - let's do the same thing here.
+ std::string unique_name = params.main_frame_name;
+ frame_tree_.root()->SetFrameName(params.main_frame_name, unique_name);
WebContentsViewDelegate* delegate =
GetContentClient()->browser()->GetWebContentsViewDelegate(this);

Powered by Google App Engine
This is Rietveld 408576698