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

Unified Diff: extensions/browser/guest_view/web_view/web_view_guest.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: extensions/browser/guest_view/web_view/web_view_guest.cc
diff --git a/extensions/browser/guest_view/web_view/web_view_guest.cc b/extensions/browser/guest_view/web_view/web_view_guest.cc
index 4dedeee8a202b3c675c161161cc9180001e058db..1cecf738f470be70b12602c3a4d35a421fe1df75 100644
--- a/extensions/browser/guest_view/web_view/web_view_guest.cc
+++ b/extensions/browser/guest_view/web_view/web_view_guest.cc
@@ -31,6 +31,7 @@
#include "content/public/browser/user_metrics.h"
#include "content/public/browser/web_contents.h"
#include "content/public/browser/web_contents_delegate.h"
+#include "content/public/browser/web_contents_source.h"
#include "content/public/common/media_stream_request.h"
#include "content/public/common/page_zoom.h"
#include "content/public/common/result_codes.h"
@@ -355,7 +356,9 @@ void WebViewGuest::CreateWebContents(
owner_render_process_host->GetBrowserContext(),
guest_site_instance);
params.guest_delegate = this;
- callback.Run(WebContents::Create(params));
+ WebContents* web_contents = WebContents::Create(params);
+ WebContentsSource::CreateForWebContentsAndLocation(web_contents, FROM_HERE);
+ callback.Run(web_contents);
}
void WebViewGuest::DidAttachToEmbedder() {

Powered by Google App Engine
This is Rietveld 408576698