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()); |