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

Unified Diff: apps/custom_launcher_page_contents.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: apps/custom_launcher_page_contents.cc
diff --git a/apps/custom_launcher_page_contents.cc b/apps/custom_launcher_page_contents.cc
index 8888993aac5c39e380dc2df0ecc7ff1d34ae93ab..f1738a34c8380e50a09a1caa0203a74138f4774a 100644
--- a/apps/custom_launcher_page_contents.cc
+++ b/apps/custom_launcher_page_contents.cc
@@ -11,6 +11,7 @@
#include "content/public/browser/render_view_host.h"
#include "content/public/browser/site_instance.h"
#include "content/public/browser/web_contents.h"
+#include "content/public/browser/web_contents_source.h"
#include "content/public/common/renderer_preferences.h"
#include "extensions/browser/app_window/app_delegate.h"
#include "extensions/browser/app_window/app_web_contents_helper.h"
@@ -34,6 +35,8 @@ void CustomLauncherPageContents::Initialize(content::BrowserContext* context,
content::WebContents::Create(content::WebContents::CreateParams(
context, content::SiteInstance::CreateForURL(context, url))));
+ WebContentsSource::CreateForWebContentsAndLocation(web_contents_.get(),
+ FROM_HERE);
web_contents_->GetMutableRendererPrefs()
->browser_handles_all_top_level_requests = true;
web_contents_->GetRenderViewHost()->SyncRendererPrefs();

Powered by Google App Engine
This is Rietveld 408576698