| 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 <sstream> | 5 #include <sstream> |
| 6 | 6 |
| 7 #include "chrome/test/automation/automation_proxy.h" | 7 #include "chrome/test/automation/automation_proxy.h" |
| 8 | 8 |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "base/file_version_info.h" | 10 #include "base/file_version_info.h" |
| (...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 187 return; | 187 return; |
| 188 } | 188 } |
| 189 server_version_ = version_string; | 189 server_version_ = version_string; |
| 190 app_launched_.Signal(); | 190 app_launched_.Signal(); |
| 191 } | 191 } |
| 192 | 192 |
| 193 bool AutomationProxy::WaitForInitialLoads() { | 193 bool AutomationProxy::WaitForInitialLoads() { |
| 194 return initial_loads_complete_.TimedWait(command_execution_timeout_); | 194 return initial_loads_complete_.TimedWait(command_execution_timeout_); |
| 195 } | 195 } |
| 196 | 196 |
| 197 bool AutomationProxy::QuitAfterTimeout(int timeout_ms) { |
| 198 return Send(new AutomationMsg_QuitAfterTimeout(0, timeout_ms)); |
| 199 } |
| 200 |
| 197 bool AutomationProxy::WaitForInitialNewTabUILoad(int* load_time) { | 201 bool AutomationProxy::WaitForInitialNewTabUILoad(int* load_time) { |
| 198 if (new_tab_ui_load_complete_.TimedWait(command_execution_timeout_)) { | 202 if (new_tab_ui_load_complete_.TimedWait(command_execution_timeout_)) { |
| 199 *load_time = new_tab_ui_load_time_; | 203 *load_time = new_tab_ui_load_time_; |
| 200 new_tab_ui_load_complete_.Reset(); | 204 new_tab_ui_load_complete_.Reset(); |
| 201 return true; | 205 return true; |
| 202 } | 206 } |
| 203 return false; | 207 return false; |
| 204 } | 208 } |
| 205 | 209 |
| 206 void AutomationProxy::SignalInitialLoads() { | 210 void AutomationProxy::SignalInitialLoads() { |
| (...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 511 if (!p) { | 515 if (!p) { |
| 512 p = new T(this, tracker_.get(), handle); | 516 p = new T(this, tracker_.get(), handle); |
| 513 p->AddRef(); | 517 p->AddRef(); |
| 514 } | 518 } |
| 515 | 519 |
| 516 // Since there is no scoped_refptr::attach. | 520 // Since there is no scoped_refptr::attach. |
| 517 scoped_refptr<T> result; | 521 scoped_refptr<T> result; |
| 518 result.swap(&p); | 522 result.swap(&p); |
| 519 return result; | 523 return result; |
| 520 } | 524 } |
| OLD | NEW |