| Index: chrome/browser/extensions/extension_host.cc
|
| diff --git a/chrome/browser/extensions/extension_host.cc b/chrome/browser/extensions/extension_host.cc
|
| index f72fbcedf017fec80ea738f429393547eb3d800f..f8126480dad12594316db3ed7cde71440895b5a3 100644
|
| --- a/chrome/browser/extensions/extension_host.cc
|
| +++ b/chrome/browser/extensions/extension_host.cc
|
| @@ -59,6 +59,7 @@
|
|
|
| using WebKit::WebDragOperation;
|
| using WebKit::WebDragOperationsMask;
|
| +using content::DownloadItem;
|
| using content::NativeWebKeyboardEvent;
|
| using content::OpenURLParams;
|
| using content::RenderViewHost;
|
| @@ -410,6 +411,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();
|
|
|