| Index: chrome/browser/extensions/extension_host.cc
|
| diff --git a/chrome/browser/extensions/extension_host.cc b/chrome/browser/extensions/extension_host.cc
|
| index ff721c6958adf61d3824fcf6d00fd95618694a09..c6f231b0e62e14616b2bdff8cc9a73d32d3ebd43 100644
|
| --- a/chrome/browser/extensions/extension_host.cc
|
| +++ b/chrome/browser/extensions/extension_host.cc
|
| @@ -58,6 +58,7 @@
|
|
|
| using WebKit::WebDragOperation;
|
| using WebKit::WebDragOperationsMask;
|
| +using content::DownloadItem;
|
| using content::NativeWebKeyboardEvent;
|
| using content::OpenURLParams;
|
| using content::RenderViewHost;
|
| @@ -409,6 +410,17 @@ void ExtensionHost::CloseContents(WebContents* contents) {
|
| }
|
| }
|
|
|
| +void ExtensionHost::OnStartDownload(
|
| + WebContents* source, DownloadItem* download) {
|
| + Profile* profile = Profile::FromBrowserContext(source->GetBrowserContext());
|
| + Browser* browser = browser::FindTabbedBrowser(
|
| + profile, false); // Match incognito exactly.
|
| + if (!browser && view())
|
| + browser = view()->browser();
|
| + if (browser)
|
| + browser->OnStartDownload(source, download);
|
| +}
|
| +
|
| void ExtensionHost::WillRunJavaScriptDialog() {
|
| ExtensionProcessManager* pm =
|
| ExtensionSystem::Get(profile_)->process_manager();
|
|
|