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

Unified Diff: ui/views/controls/webview/webview.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: ui/views/controls/webview/webview.cc
diff --git a/ui/views/controls/webview/webview.cc b/ui/views/controls/webview/webview.cc
index 8e6465ea757efa96e7de1c4c11bddabc540418d6..a09dc5c3612617fb7e72e3a4e2de81a20e2bf35e 100644
--- a/ui/views/controls/webview/webview.cc
+++ b/ui/views/controls/webview/webview.cc
@@ -11,6 +11,7 @@
#include "content/public/browser/render_view_host.h"
#include "content/public/browser/render_widget_host_view.h"
#include "content/public/browser/web_contents.h"
+#include "content/public/browser/web_contents_source.h"
#include "ipc/ipc_message.h"
#include "ui/accessibility/ax_enums.h"
#include "ui/accessibility/ax_view_state.h"
@@ -390,7 +391,10 @@ content::WebContents* WebView::CreateWebContents(
if (!contents) {
content::WebContents::CreateParams create_params(
browser_context, NULL);
- return content::WebContents::Create(create_params);
+ content::WebContents* web_contents =
+ content::WebContents::Create(create_params);
+ WebContentsSource::CreateForWebContentsAndLocation(web_contents, FROM_HERE);
+ return web_contents;
}
return contents;

Powered by Google App Engine
This is Rietveld 408576698