| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "base/string16.h" | 10 #include "base/string16.h" |
| 11 #include "base/utf_string_conversions.h" | 11 #include "base/utf_string_conversions.h" |
| 12 #include "chrome/common/automation_messages.h" |
| 12 #include "chrome/common/json_value_serializer.h" | 13 #include "chrome/common/json_value_serializer.h" |
| 13 #include "chrome/test/automation/automation_constants.h" | |
| 14 #include "chrome/test/automation/automation_messages.h" | |
| 15 #include "chrome/test/automation/automation_proxy.h" | 14 #include "chrome/test/automation/automation_proxy.h" |
| 16 #include "googleurl/src/gurl.h" | 15 #include "googleurl/src/gurl.h" |
| 17 | 16 |
| 18 TabProxy::TabProxy(AutomationMessageSender* sender, | 17 TabProxy::TabProxy(AutomationMessageSender* sender, |
| 19 AutomationHandleTracker* tracker, | 18 AutomationHandleTracker* tracker, |
| 20 int handle) | 19 int handle) |
| 21 : AutomationResourceProxy(tracker, sender, handle) { | 20 : AutomationResourceProxy(tracker, sender, handle) { |
| 22 } | 21 } |
| 23 | 22 |
| 24 | 23 |
| (...skipping 574 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 599 | 598 |
| 600 bool succeeded = false; | 599 bool succeeded = false; |
| 601 | 600 |
| 602 sender_->Send(new AutomationMsg_GetSecurityState( | 601 sender_->Send(new AutomationMsg_GetSecurityState( |
| 603 0, handle_, &succeeded, security_style, ssl_cert_status, | 602 0, handle_, &succeeded, security_style, ssl_cert_status, |
| 604 insecure_content_status)); | 603 insecure_content_status)); |
| 605 | 604 |
| 606 return succeeded; | 605 return succeeded; |
| 607 } | 606 } |
| 608 | 607 |
| 609 bool TabProxy::GetPageType(NavigationEntry::PageType* type) { | 608 bool TabProxy::GetPageType(PageType* type) { |
| 610 DCHECK(type); | 609 DCHECK(type); |
| 611 | 610 |
| 612 if (!is_valid()) | 611 if (!is_valid()) |
| 613 return false; | 612 return false; |
| 614 | 613 |
| 615 bool succeeded = false; | 614 bool succeeded = false; |
| 616 sender_->Send(new AutomationMsg_GetPageType(0, handle_, &succeeded, type)); | 615 sender_->Send(new AutomationMsg_GetPageType(0, handle_, &succeeded, type)); |
| 617 return succeeded; | 616 return succeeded; |
| 618 } | 617 } |
| 619 | 618 |
| (...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 830 json)); | 829 json)); |
| 831 } | 830 } |
| 832 | 831 |
| 833 void TabProxy::FirstObjectAdded() { | 832 void TabProxy::FirstObjectAdded() { |
| 834 AddRef(); | 833 AddRef(); |
| 835 } | 834 } |
| 836 | 835 |
| 837 void TabProxy::LastObjectRemoved() { | 836 void TabProxy::LastObjectRemoved() { |
| 838 Release(); | 837 Release(); |
| 839 } | 838 } |
| OLD | NEW |