| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/external_tab_container.h" | 5 #include "chrome/browser/external_tab_container.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "app/l10n_util.h" | 9 #include "app/l10n_util.h" |
| 10 #include "app/win_util.h" | 10 #include "app/win_util.h" |
| (...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 390 automation_->Send(new AutomationMsg_TabbedOut(0, tab_handle_, | 390 automation_->Send(new AutomationMsg_TabbedOut(0, tab_handle_, |
| 391 win_util::IsShiftPressed())); | 391 win_util::IsShiftPressed())); |
| 392 } | 392 } |
| 393 | 393 |
| 394 return true; | 394 return true; |
| 395 } | 395 } |
| 396 | 396 |
| 397 bool ExternalTabContainer::CanDownload(int request_id) { | 397 bool ExternalTabContainer::CanDownload(int request_id) { |
| 398 if (load_requests_via_automation_) { | 398 if (load_requests_via_automation_) { |
| 399 if (automation_) { | 399 if (automation_) { |
| 400 // In case the host needs to show UI that needs to take the focus. |
| 401 ::AllowSetForegroundWindow(ASFW_ANY); |
| 402 |
| 400 ChromeThread::PostTask(ChromeThread::IO, FROM_HERE, | 403 ChromeThread::PostTask(ChromeThread::IO, FROM_HERE, |
| 401 NewRunnableMethod(automation_resource_message_filter_, | 404 NewRunnableMethod(automation_resource_message_filter_, |
| 402 &AutomationResourceMessageFilter::SendDownloadRequestToHost, | 405 &AutomationResourceMessageFilter::SendDownloadRequestToHost, |
| 403 0, tab_handle_, request_id)); | 406 0, tab_handle_, request_id)); |
| 404 } | 407 } |
| 405 } else { | 408 } else { |
| 406 DLOG(WARNING) << "Downloads are only supported with host browser network " | 409 DLOG(WARNING) << "Downloads are only supported with host browser network " |
| 407 "stack enabled."; | 410 "stack enabled."; |
| 408 } | 411 } |
| 409 | 412 |
| (...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 698 int tab_handle) { | 701 int tab_handle) { |
| 699 request_context_ = | 702 request_context_ = |
| 700 AutomationRequestContext::CreateAutomationURLRequestContextForTab( | 703 AutomationRequestContext::CreateAutomationURLRequestContextForTab( |
| 701 tab_handle, tab_contents_->profile(), | 704 tab_handle, tab_contents_->profile(), |
| 702 automation_resource_message_filter_); | 705 automation_resource_message_filter_); |
| 703 | 706 |
| 704 DCHECK(request_context_.get() != NULL); | 707 DCHECK(request_context_.get() != NULL); |
| 705 tab_contents_->set_request_context(request_context_.get()); | 708 tab_contents_->set_request_context(request_context_.get()); |
| 706 } | 709 } |
| 707 | 710 |
| OLD | NEW |