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

Unified Diff: components/guest_view/browser/guest_view_manager.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: components/guest_view/browser/guest_view_manager.cc
diff --git a/components/guest_view/browser/guest_view_manager.cc b/components/guest_view/browser/guest_view_manager.cc
index 4c86e9d17439fad976ee75dc623b66492bfc72bc..5bb9fa55b3294ee1095c98c2f221c540d394eae3 100644
--- a/components/guest_view/browser/guest_view_manager.cc
+++ b/components/guest_view/browser/guest_view_manager.cc
@@ -16,6 +16,7 @@
#include "content/public/browser/render_view_host.h"
#include "content/public/browser/user_metrics.h"
#include "content/public/browser/web_contents_observer.h"
+#include "content/public/browser/web_contents_source.h"
#include "content/public/common/child_process_host.h"
#include "content/public/common/result_codes.h"
#include "content/public/common/url_constants.h"
@@ -180,6 +181,8 @@ content::WebContents* GuestViewManager::CreateGuestWithWebContentsParams(
content::WebContents::CreateParams guest_create_params(create_params);
guest_create_params.guest_delegate = guest;
auto guest_web_contents = WebContents::Create(guest_create_params);
+ WebContentsSource::CreateForWebContentsAndLocation(guest_web_contents,
+ FROM_HERE);
guest->InitWithWebContents(base::DictionaryValue(), guest_web_contents);
return guest_web_contents;
}

Powered by Google App Engine
This is Rietveld 408576698