| 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" |
| (...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 222 | 222 |
| 223 bool status = false; | 223 bool status = false; |
| 224 sender_->Send(new AutomationMsg_NavigationAsyncWithDisposition(0, | 224 sender_->Send(new AutomationMsg_NavigationAsyncWithDisposition(0, |
| 225 handle_, | 225 handle_, |
| 226 url, | 226 url, |
| 227 disposition, | 227 disposition, |
| 228 &status)); | 228 &status)); |
| 229 return status; | 229 return status; |
| 230 } | 230 } |
| 231 | 231 |
| 232 #if defined(OS_WIN) | |
| 233 // TODO(port): Get rid of HWND. | |
| 234 bool TabProxy::GetHWND(HWND* hwnd) const { | |
| 235 if (!is_valid()) | |
| 236 return false; | |
| 237 if (!hwnd) { | |
| 238 NOTREACHED(); | |
| 239 return false; | |
| 240 } | |
| 241 | |
| 242 return sender_->Send(new AutomationMsg_TabHWND(0, handle_, hwnd)); | |
| 243 } | |
| 244 #endif // defined(OS_WIN) | |
| 245 | |
| 246 bool TabProxy::GetProcessID(int* process_id) const { | 232 bool TabProxy::GetProcessID(int* process_id) const { |
| 247 if (!is_valid()) | 233 if (!is_valid()) |
| 248 return false; | 234 return false; |
| 249 | 235 |
| 250 if (!process_id) { | 236 if (!process_id) { |
| 251 NOTREACHED(); | 237 NOTREACHED(); |
| 252 return false; | 238 return false; |
| 253 } | 239 } |
| 254 | 240 |
| 255 return sender_->Send(new AutomationMsg_TabProcessID(0, handle_, process_id)); | 241 return sender_->Send(new AutomationMsg_TabProcessID(0, handle_, process_id)); |
| (...skipping 583 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 839 json)); | 825 json)); |
| 840 } | 826 } |
| 841 | 827 |
| 842 void TabProxy::FirstObjectAdded() { | 828 void TabProxy::FirstObjectAdded() { |
| 843 AddRef(); | 829 AddRef(); |
| 844 } | 830 } |
| 845 | 831 |
| 846 void TabProxy::LastObjectRemoved() { | 832 void TabProxy::LastObjectRemoved() { |
| 847 Release(); | 833 Release(); |
| 848 } | 834 } |
| OLD | NEW |