| 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/browser_proxy.h" | 5 #include "chrome/test/automation/browser_proxy.h" | 
| 6 | 6 | 
| 7 #include <vector> | 7 #include <vector> | 
| 8 | 8 | 
| 9 #include "base/logging.h" | 9 #include "base/logging.h" | 
| 10 #include "base/time.h" | 10 #include "base/time.h" | 
| 11 #include "chrome/test/automation/automation_constants.h" | 11 #include "chrome/test/automation/automation_constants.h" | 
| 12 #include "chrome/test/automation/automation_messages.h" | 12 #include "chrome/test/automation/automation_messages.h" | 
| 13 #include "chrome/test/automation/automation_proxy.h" | 13 #include "chrome/test/automation/automation_proxy.h" | 
| 14 #include "chrome/test/automation/tab_proxy.h" | 14 #include "chrome/test/automation/tab_proxy.h" | 
| 15 | 15 | 
|  | 16 using base::TimeDelta; | 
|  | 17 using base::TimeTicks; | 
|  | 18 | 
| 16 bool BrowserProxy::ActivateTab(int tab_index) { | 19 bool BrowserProxy::ActivateTab(int tab_index) { | 
| 17   return ActivateTabWithTimeout(tab_index, INFINITE, NULL); | 20   return ActivateTabWithTimeout(tab_index, INFINITE, NULL); | 
| 18 } | 21 } | 
| 19 | 22 | 
| 20 bool BrowserProxy::ActivateTabWithTimeout(int tab_index, uint32 timeout_ms, | 23 bool BrowserProxy::ActivateTabWithTimeout(int tab_index, uint32 timeout_ms, | 
| 21                                           bool* is_timeout) { | 24                                           bool* is_timeout) { | 
| 22   if (!is_valid()) | 25   if (!is_valid()) | 
| 23     return false; | 26     return false; | 
| 24 | 27 | 
| 25   IPC::Message* response = NULL; | 28   IPC::Message* response = NULL; | 
| (...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 385   scoped_ptr<IPC::Message> response_deleter(response);  // Delete on return. | 388   scoped_ptr<IPC::Message> response_deleter(response);  // Delete on return. | 
| 386   if (!success) | 389   if (!success) | 
| 387     return false; | 390     return false; | 
| 388 | 391 | 
| 389   if (AutomationMsg_SetIntPreferenceResponse::Read(response, &success)) | 392   if (AutomationMsg_SetIntPreferenceResponse::Read(response, &success)) | 
| 390     return success; | 393     return success; | 
| 391 | 394 | 
| 392   // We failed to deserialize the returned value. | 395   // We failed to deserialize the returned value. | 
| 393   return false; | 396   return false; | 
| 394 } | 397 } | 
| OLD | NEW | 
|---|