OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
126 int* duration_ms) WARN_UNUSED_RESULT; | 126 int* duration_ms) WARN_UNUSED_RESULT; |
127 | 127 |
128 // Returns the BrowserProxy for the browser window at the given index, | 128 // Returns the BrowserProxy for the browser window at the given index, |
129 // transferring ownership of the pointer to the caller. | 129 // transferring ownership of the pointer to the caller. |
130 // On failure, returns NULL. | 130 // On failure, returns NULL. |
131 // | 131 // |
132 // Use GetBrowserWindowCount to see how many browser windows you can ask for. | 132 // Use GetBrowserWindowCount to see how many browser windows you can ask for. |
133 // Window numbers are 0-based. | 133 // Window numbers are 0-based. |
134 scoped_refptr<BrowserProxy> GetBrowserWindow(int window_index); | 134 scoped_refptr<BrowserProxy> GetBrowserWindow(int window_index); |
135 | 135 |
136 // Finds the first browser window that is not incognito mode and of type | |
137 // TYPE_TABBED, and returns its corresponding BrowserProxy, transferring | |
138 // ownership of the pointer to the caller. | |
139 // On failure, returns NULL. | |
140 scoped_refptr<BrowserProxy> FindTabbedBrowserWindow(); | |
141 | |
142 // Sends the browser a new proxy configuration to start using. Returns true | 136 // Sends the browser a new proxy configuration to start using. Returns true |
143 // if the proxy config was successfully sent, false otherwise. | 137 // if the proxy config was successfully sent, false otherwise. |
144 bool SendProxyConfig(const std::string& new_proxy_config) WARN_UNUSED_RESULT; | 138 bool SendProxyConfig(const std::string& new_proxy_config) WARN_UNUSED_RESULT; |
145 | 139 |
146 // These methods are intended to be called by the background thread | 140 // These methods are intended to be called by the background thread |
147 // to signal that the given event has occurred, and that any corresponding | 141 // to signal that the given event has occurred, and that any corresponding |
148 // Wait... function can return. | 142 // Wait... function can return. |
149 void SignalAppLaunch(const std::string& version_string); | 143 void SignalAppLaunch(const std::string& version_string); |
150 void SignalInitialLoads(); | 144 void SignalInitialLoads(); |
151 // load_time is how long, in ms, the tab contents took to load. | 145 // load_time is how long, in ms, the tab contents took to load. |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
268 | 262 |
269 // Delay to let the browser execute the command. | 263 // Delay to let the browser execute the command. |
270 base::TimeDelta action_timeout_; | 264 base::TimeDelta action_timeout_; |
271 | 265 |
272 base::PlatformThreadId listener_thread_id_; | 266 base::PlatformThreadId listener_thread_id_; |
273 | 267 |
274 DISALLOW_COPY_AND_ASSIGN(AutomationProxy); | 268 DISALLOW_COPY_AND_ASSIGN(AutomationProxy); |
275 }; | 269 }; |
276 | 270 |
277 #endif // CHROME_TEST_AUTOMATION_AUTOMATION_PROXY_H_ | 271 #endif // CHROME_TEST_AUTOMATION_AUTOMATION_PROXY_H_ |
OLD | NEW |