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 386 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
397 automation_->Send(new AutomationMsg_TabbedOut(0, tab_handle_, | 397 automation_->Send(new AutomationMsg_TabbedOut(0, tab_handle_, |
398 win_util::IsShiftPressed())); | 398 win_util::IsShiftPressed())); |
399 } | 399 } |
400 | 400 |
401 return true; | 401 return true; |
402 } | 402 } |
403 | 403 |
404 bool ExternalTabContainer::CanDownload(int request_id) { | 404 bool ExternalTabContainer::CanDownload(int request_id) { |
405 if (load_requests_via_automation_) { | 405 if (load_requests_via_automation_) { |
406 if (automation_) { | 406 if (automation_) { |
407 // NOTE: The request_id must be the same id as used by corresponding | 407 ChromeThread::PostTask(ChromeThread::IO, FROM_HERE, |
408 // URLRequestAutomationJob instance to communicate with the host. | 408 NewRunnableMethod(automation_resource_message_filter_, |
409 automation_->Send(new AutomationMsg_DownloadRequestInHost(0, tab_handle_, | 409 &AutomationResourceMessageFilter::SendDownloadRequestToHost, |
410 request_id)); | 410 0, tab_handle_, request_id)); |
411 } | 411 } |
412 } else { | 412 } else { |
413 DLOG(WARNING) << "Downloads are only supported with host browser network " | 413 DLOG(WARNING) << "Downloads are only supported with host browser network " |
414 "stack enabled."; | 414 "stack enabled."; |
415 } | 415 } |
416 | 416 |
417 // Never allow downloads. | 417 // Never allow downloads. |
418 return false; | 418 return false; |
419 } | 419 } |
420 | 420 |
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
693 | 693 |
694 bool ExternalTabContainer::OnGoToEntryOffset(int offset) { | 694 bool ExternalTabContainer::OnGoToEntryOffset(int offset) { |
695 if (load_requests_via_automation_) { | 695 if (load_requests_via_automation_) { |
696 automation_->Send(new AutomationMsg_RequestGoToHistoryEntryOffset( | 696 automation_->Send(new AutomationMsg_RequestGoToHistoryEntryOffset( |
697 0, tab_handle_, offset)); | 697 0, tab_handle_, offset)); |
698 return false; | 698 return false; |
699 } | 699 } |
700 | 700 |
701 return true; | 701 return true; |
702 } | 702 } |
OLD | NEW |