| 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/test/automation/tab_proxy.h" | 5 #include "chrome/test/automation/tab_proxy.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "chrome/common/json_value_serializer.h" | 10 #include "chrome/common/json_value_serializer.h" |
| (...skipping 558 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 569 return succeeded; | 569 return succeeded; |
| 570 } | 570 } |
| 571 | 571 |
| 572 bool TabProxy::PrintAsync() { | 572 bool TabProxy::PrintAsync() { |
| 573 if (!is_valid()) | 573 if (!is_valid()) |
| 574 return false; | 574 return false; |
| 575 | 575 |
| 576 return sender_->Send(new AutomationMsg_PrintAsync(0, handle_)); | 576 return sender_->Send(new AutomationMsg_PrintAsync(0, handle_)); |
| 577 } | 577 } |
| 578 | 578 |
| 579 bool TabProxy::SavePage(const std::wstring& file_name, | 579 bool TabProxy::SavePage(const FilePath& file_name, |
| 580 const std::wstring& dir_path, | 580 const FilePath& dir_path, |
| 581 SavePackage::SavePackageType type) { | 581 SavePackage::SavePackageType type) { |
| 582 if (!is_valid()) | 582 if (!is_valid()) |
| 583 return false; | 583 return false; |
| 584 | 584 |
| 585 bool succeeded = false; | 585 bool succeeded = false; |
| 586 sender_->Send(new AutomationMsg_SavePage(0, handle_, file_name, dir_path, | 586 sender_->Send(new AutomationMsg_SavePage(0, handle_, file_name, dir_path, |
| 587 static_cast<int>(type), | 587 static_cast<int>(type), |
| 588 &succeeded)); | 588 &succeeded)); |
| 589 return succeeded; | 589 return succeeded; |
| 590 } | 590 } |
| (...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 721 AutoLock lock(list_lock_); | 721 AutoLock lock(list_lock_); |
| 722 observers_list_.RemoveObserver(observer); | 722 observers_list_.RemoveObserver(observer); |
| 723 } | 723 } |
| 724 | 724 |
| 725 // Called on Channel background thread, if TabMessages filter is installed. | 725 // Called on Channel background thread, if TabMessages filter is installed. |
| 726 void TabProxy::OnMessageReceived(const IPC::Message& message) { | 726 void TabProxy::OnMessageReceived(const IPC::Message& message) { |
| 727 AutoLock lock(list_lock_); | 727 AutoLock lock(list_lock_); |
| 728 FOR_EACH_OBSERVER(TabProxyDelegate, observers_list_, | 728 FOR_EACH_OBSERVER(TabProxyDelegate, observers_list_, |
| 729 OnMessageReceived(this, message)); | 729 OnMessageReceived(this, message)); |
| 730 } | 730 } |
| OLD | NEW |