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

Unified Diff: chrome/browser/extensions/api/tab_capture/offscreen_tab.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/extensions/api/tab_capture/offscreen_tab.cc
diff --git a/chrome/browser/extensions/api/tab_capture/offscreen_tab.cc b/chrome/browser/extensions/api/tab_capture/offscreen_tab.cc
index ea9a049fe73590aa7afb1fe0f55bc490e7814d4c..2bbb363797d68db2f570257681d3cf42cc722eb6 100644
--- a/chrome/browser/extensions/api/tab_capture/offscreen_tab.cc
+++ b/chrome/browser/extensions/api/tab_capture/offscreen_tab.cc
@@ -12,6 +12,7 @@
#include "chrome/browser/ui/web_contents_sizer.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 "extensions/browser/extension_host.h"
#include "extensions/browser/process_manager.h"
@@ -181,6 +182,8 @@ void OffscreenTab::Start(const GURL& start_url,
// Create the WebContents to contain the off-screen tab's page.
offscreen_tab_web_contents_.reset(
WebContents::Create(WebContents::CreateParams(profile_.get())));
+ WebContentsSource::CreateForWebContentsAndLocation(
+ offscreen_tab_web_contents_.get(), FROM_HERE);
offscreen_tab_web_contents_->SetDelegate(this);
WebContentsObserver::Observe(offscreen_tab_web_contents_.get());

Powered by Google App Engine
This is Rietveld 408576698