Index: chrome/browser/external_tab_container_win.cc |
=================================================================== |
--- chrome/browser/external_tab_container_win.cc (revision 85514) |
+++ chrome/browser/external_tab_container_win.cc (working copy) |
@@ -159,7 +159,6 @@ |
} |
tab_contents_->tab_contents()->set_delegate(this); |
- tab_contents_->download_tab_helper()->set_delegate(this); |
tab_contents_->tab_contents()-> |
GetMutableRendererPrefs()->browser_handles_top_level_requests = |
@@ -540,6 +539,26 @@ |
return true; |
} |
+bool ExternalTabContainer::CanDownload(int request_id) { |
+ if (load_requests_via_automation_) { |
+ if (automation_) { |
+ // In case the host needs to show UI that needs to take the focus. |
+ ::AllowSetForegroundWindow(ASFW_ANY); |
+ |
+ BrowserThread::PostTask(BrowserThread::IO, FROM_HERE, |
+ NewRunnableMethod(automation_resource_message_filter_.get(), |
+ &AutomationResourceMessageFilter::SendDownloadRequestToHost, |
+ 0, tab_handle_, request_id)); |
+ } |
+ } else { |
+ DLOG(WARNING) << "Downloads are only supported with host browser network " |
+ "stack enabled."; |
+ } |
+ |
+ // Never allow downloads. |
+ return false; |
+} |
+ |
void ExternalTabContainer::ShowPageInfo(Profile* profile, |
const GURL& url, |
const NavigationEntry::SSLStatus& ssl, |
@@ -765,34 +784,6 @@ |
} |
//////////////////////////////////////////////////////////////////////////////// |
-// ExternalTabContainer, DownloadTabHelperDelegate overrides: |
- |
-bool ExternalTabContainer::CanDownload(int request_id) { |
- if (load_requests_via_automation_) { |
- if (automation_) { |
- // In case the host needs to show UI that needs to take the focus. |
- ::AllowSetForegroundWindow(ASFW_ANY); |
- |
- BrowserThread::PostTask(BrowserThread::IO, FROM_HERE, |
- NewRunnableMethod(automation_resource_message_filter_.get(), |
- &AutomationResourceMessageFilter::SendDownloadRequestToHost, |
- 0, tab_handle_, request_id)); |
- } |
- } else { |
- DLOG(WARNING) << "Downloads are only supported with host browser network " |
- "stack enabled."; |
- } |
- |
- // Never allow downloads. |
- return false; |
-} |
- |
-void ExternalTabContainer::OnStartDownload(DownloadItem* download, |
- TabContentsWrapper* tab) { |
-} |
- |
- |
-//////////////////////////////////////////////////////////////////////////////// |
// ExternalTabContainer, views::WidgetWin overrides: |
LRESULT ExternalTabContainer::OnCreate(LPCREATESTRUCT create_struct) { |