| 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 #ifndef CHROME_TEST_AUTOMATION_AUTOMATION_PROXY_H__ | 5 #ifndef CHROME_TEST_AUTOMATION_AUTOMATION_PROXY_H__ |
| 6 #define CHROME_TEST_AUTOMATION_AUTOMATION_PROXY_H__ | 6 #define CHROME_TEST_AUTOMATION_AUTOMATION_PROXY_H__ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "app/message_box_flags.h" | 10 #include "app/message_box_flags.h" |
| 11 #include "app/gfx/native_widget_types.h" | 11 #include "app/gfx/native_widget_types.h" |
| 12 #include "base/basictypes.h" | 12 #include "base/basictypes.h" |
| 13 #include "base/process_util.h" | 13 #include "base/process_util.h" |
| 14 #include "base/scoped_ptr.h" | 14 #include "base/scoped_ptr.h" |
| 15 #include "base/time.h" | 15 #include "base/time.h" |
| 16 #include "base/thread.h" | 16 #include "base/thread.h" |
| 17 #include "base/waitable_event.h" | 17 #include "base/waitable_event.h" |
| 18 #include "chrome/browser/browser.h" |
| 18 #include "chrome/test/automation/automation_constants.h" | 19 #include "chrome/test/automation/automation_constants.h" |
| 19 #include "chrome/test/automation/automation_handle_tracker.h" | 20 #include "chrome/test/automation/automation_handle_tracker.h" |
| 20 #include "chrome/test/automation/browser_proxy.h" | 21 #include "chrome/test/automation/browser_proxy.h" |
| 21 #include "googleurl/src/gurl.h" | 22 #include "googleurl/src/gurl.h" |
| 22 #include "ipc/ipc_channel_proxy.h" | 23 #include "ipc/ipc_channel_proxy.h" |
| 23 #include "ipc/ipc_message.h" | 24 #include "ipc/ipc_message.h" |
| 24 #include "ipc/ipc_sync_channel.h" | 25 #include "ipc/ipc_sync_channel.h" |
| 25 | 26 |
| 26 class BrowserProxy; | 27 class BrowserProxy; |
| 27 class TabProxy; | 28 class TabProxy; |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 bool WaitForInitialLoads(); | 83 bool WaitForInitialLoads(); |
| 83 | 84 |
| 84 // Waits for the initial destinations tab to report that it has finished | 85 // Waits for the initial destinations tab to report that it has finished |
| 85 // querying. |load_time| is filled in with how long it took, in milliseconds. | 86 // querying. |load_time| is filled in with how long it took, in milliseconds. |
| 86 // NOTE: this only fires once for a run of the application. | 87 // NOTE: this only fires once for a run of the application. |
| 87 // Returns true if the load is successful. | 88 // Returns true if the load is successful. |
| 88 bool WaitForInitialNewTabUILoad(int* load_time); | 89 bool WaitForInitialNewTabUILoad(int* load_time); |
| 89 | 90 |
| 90 // Open a new browser window of type |type|, returning true on success. |show| | 91 // Open a new browser window of type |type|, returning true on success. |show| |
| 91 // identifies whether the window should be shown. Returns true on success. | 92 // identifies whether the window should be shown. Returns true on success. |
| 92 bool OpenNewBrowserWindow(BrowserProxy::Type type, bool show); | 93 bool OpenNewBrowserWindow(Browser::Type type, bool show); |
| 93 | 94 |
| 94 // Fills the number of open browser windows into the given variable, returning | 95 // Fills the number of open browser windows into the given variable, returning |
| 95 // true on success. False likely indicates an IPC error. | 96 // true on success. False likely indicates an IPC error. |
| 96 bool GetBrowserWindowCount(int* num_windows); | 97 bool GetBrowserWindowCount(int* num_windows); |
| 97 | 98 |
| 98 // Block the thread until the window count becomes the provided value. | 99 // Block the thread until the window count becomes the provided value. |
| 99 // Returns true on success. | 100 // Returns true on success. |
| 100 bool WaitForWindowCountToBecome(int target_count, int wait_timeout); | 101 bool WaitForWindowCountToBecome(int target_count, int wait_timeout); |
| 101 | 102 |
| 102 // Fills the number of open normal browser windows (normal type and | 103 // Fills the number of open normal browser windows (normal type and |
| (...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 273 // a version resource. | 274 // a version resource. |
| 274 bool perform_version_check_; | 275 bool perform_version_check_; |
| 275 | 276 |
| 276 // Delay to let the browser execute the command. | 277 // Delay to let the browser execute the command. |
| 277 base::TimeDelta command_execution_timeout_; | 278 base::TimeDelta command_execution_timeout_; |
| 278 | 279 |
| 279 DISALLOW_COPY_AND_ASSIGN(AutomationProxy); | 280 DISALLOW_COPY_AND_ASSIGN(AutomationProxy); |
| 280 }; | 281 }; |
| 281 | 282 |
| 282 #endif // CHROME_TEST_AUTOMATION_AUTOMATION_PROXY_H__ | 283 #endif // CHROME_TEST_AUTOMATION_AUTOMATION_PROXY_H__ |
| OLD | NEW |