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

Unified Diff: chrome/browser/devtools/devtools_window.cc

Issue 1432143002: Track where WebContents are created in order to better understand issue. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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: chrome/browser/devtools/devtools_window.cc
diff --git a/chrome/browser/devtools/devtools_window.cc b/chrome/browser/devtools/devtools_window.cc
index 41863af5b69883153a826134e32132da0dd64d0c..cb69ffda23a8ef888a3119052771f989df543edb 100644
--- a/chrome/browser/devtools/devtools_window.cc
+++ b/chrome/browser/devtools/devtools_window.cc
@@ -47,6 +47,7 @@
#include "content/public/browser/render_widget_host_view.h"
#include "content/public/browser/user_metrics.h"
#include "content/public/browser/web_contents.h"
+#include "content/public/browser/web_contents_source.h"
#include "content/public/common/content_client.h"
#include "content/public/common/url_constants.h"
#include "net/base/escape.h"
@@ -773,6 +774,8 @@ DevToolsWindow* DevToolsWindow::Create(
can_dock, settings));
scoped_ptr<WebContents> main_web_contents(
WebContents::Create(WebContents::CreateParams(profile)));
+ WebContentsSource::CreateForWebContentsAndLocation(main_web_contents.get(),
+ FROM_HERE);
main_web_contents->GetController().LoadURL(
DecorateFrontendURL(url), content::Referrer(),
ui::PAGE_TRANSITION_AUTO_TOPLEVEL, std::string());

Powered by Google App Engine
This is Rietveld 408576698