summaryrefslogtreecommitdiffstats
path: root/chrome/browser/external_tab_container.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/external_tab_container.cc')
-rw-r--r--chrome/browser/external_tab_container.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/chrome/browser/external_tab_container.cc b/chrome/browser/external_tab_container.cc
index 3d9251a..ab25698 100644
--- a/chrome/browser/external_tab_container.cc
+++ b/chrome/browser/external_tab_container.cc
@@ -397,6 +397,9 @@ bool ExternalTabContainer::TakeFocus(bool reverse) {
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);
+
ChromeThread::PostTask(ChromeThread::IO, FROM_HERE,
NewRunnableMethod(automation_resource_message_filter_,
&AutomationResourceMessageFilter::SendDownloadRequestToHost,