| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/json/json_string_value_serializer.h" | 9 #include "base/json/json_string_value_serializer.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 584 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 595 return false; | 595 return false; |
| 596 | 596 |
| 597 AutomationMsg_NavigationResponseValues result = | 597 AutomationMsg_NavigationResponseValues result = |
| 598 AUTOMATION_MSG_NAVIGATION_ERROR; | 598 AUTOMATION_MSG_NAVIGATION_ERROR; |
| 599 sender_->Send(new AutomationMsg_ActionOnSSLBlockingPage(handle_, proceed, | 599 sender_->Send(new AutomationMsg_ActionOnSSLBlockingPage(handle_, proceed, |
| 600 &result)); | 600 &result)); |
| 601 return result == AUTOMATION_MSG_NAVIGATION_SUCCESS || | 601 return result == AUTOMATION_MSG_NAVIGATION_SUCCESS || |
| 602 result == AUTOMATION_MSG_NAVIGATION_AUTH_NEEDED; | 602 result == AUTOMATION_MSG_NAVIGATION_AUTH_NEEDED; |
| 603 } | 603 } |
| 604 | 604 |
| 605 bool TabProxy::PrintNow() { | |
| 606 if (!is_valid()) | |
| 607 return false; | |
| 608 | |
| 609 bool succeeded = false; | |
| 610 sender_->Send(new AutomationMsg_PrintNow(handle_, &succeeded)); | |
| 611 return succeeded; | |
| 612 } | |
| 613 | |
| 614 bool TabProxy::PrintAsync() { | 605 bool TabProxy::PrintAsync() { |
| 615 if (!is_valid()) | 606 if (!is_valid()) |
| 616 return false; | 607 return false; |
| 617 | 608 |
| 618 return sender_->Send(new AutomationMsg_PrintAsync(handle_)); | 609 return sender_->Send(new AutomationMsg_PrintAsync(handle_)); |
| 619 } | 610 } |
| 620 | 611 |
| 621 bool TabProxy::SavePage(const FilePath& file_name, | 612 bool TabProxy::SavePage(const FilePath& file_name, |
| 622 const FilePath& dir_path, | 613 const FilePath& dir_path, |
| 623 content::SavePageType type) { | 614 content::SavePageType type) { |
| (...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 828 json)); | 819 json)); |
| 829 } | 820 } |
| 830 | 821 |
| 831 void TabProxy::FirstObjectAdded() { | 822 void TabProxy::FirstObjectAdded() { |
| 832 AddRef(); | 823 AddRef(); |
| 833 } | 824 } |
| 834 | 825 |
| 835 void TabProxy::LastObjectRemoved() { | 826 void TabProxy::LastObjectRemoved() { |
| 836 Release(); | 827 Release(); |
| 837 } | 828 } |
| OLD | NEW |