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 11 matching lines...) Expand all Loading... |
22 #include "chrome/test/automation/automation_handle_tracker.h" | 22 #include "chrome/test/automation/automation_handle_tracker.h" |
23 #include "chrome/test/automation/browser_proxy.h" | 23 #include "chrome/test/automation/browser_proxy.h" |
24 #include "googleurl/src/gurl.h" | 24 #include "googleurl/src/gurl.h" |
25 #include "ipc/ipc_channel_proxy.h" | 25 #include "ipc/ipc_channel_proxy.h" |
26 #include "ipc/ipc_message.h" | 26 #include "ipc/ipc_message.h" |
27 #include "ipc/ipc_sync_channel.h" | 27 #include "ipc/ipc_sync_channel.h" |
28 #include "ui/base/ui_base_types.h" | 28 #include "ui/base/ui_base_types.h" |
29 #include "ui/gfx/native_widget_types.h" | 29 #include "ui/gfx/native_widget_types.h" |
30 | 30 |
31 class BrowserProxy; | 31 class BrowserProxy; |
32 class ExtensionProxy; | |
33 class TabProxy; | 32 class TabProxy; |
34 class WindowProxy; | 33 class WindowProxy; |
35 struct ExternalTabSettings; | 34 struct ExternalTabSettings; |
36 | 35 |
37 // This is an interface that AutomationProxy-related objects can use to | 36 // This is an interface that AutomationProxy-related objects can use to |
38 // access the message-sending abilities of the Proxy. | 37 // access the message-sending abilities of the Proxy. |
39 class AutomationMessageSender : public IPC::Message::Sender { | 38 class AutomationMessageSender : public IPC::Message::Sender { |
40 public: | 39 public: |
41 // Sends a message synchronously; it doesn't return until a response has been | 40 // Sends a message synchronously; it doesn't return until a response has been |
42 // received or a timeout has expired. | 41 // received or a timeout has expired. |
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
184 bool SendProxyConfig(const std::string& new_proxy_config) WARN_UNUSED_RESULT; | 183 bool SendProxyConfig(const std::string& new_proxy_config) WARN_UNUSED_RESULT; |
185 | 184 |
186 // These methods are intended to be called by the background thread | 185 // These methods are intended to be called by the background thread |
187 // to signal that the given event has occurred, and that any corresponding | 186 // to signal that the given event has occurred, and that any corresponding |
188 // Wait... function can return. | 187 // Wait... function can return. |
189 void SignalAppLaunch(const std::string& version_string); | 188 void SignalAppLaunch(const std::string& version_string); |
190 void SignalInitialLoads(); | 189 void SignalInitialLoads(); |
191 // load_time is how long, in ms, the tab contents took to load. | 190 // load_time is how long, in ms, the tab contents took to load. |
192 void SignalNewTabUITab(int load_time); | 191 void SignalNewTabUITab(int load_time); |
193 | 192 |
194 // Installs the extension. If |with_ui| is true an install confirmation | |
195 // and notification UI is shown, otherwise the install is silent. Returns the | |
196 // ExtensionProxy for the installed extension, or NULL on failure. | |
197 // Note: Overinstalls and downgrades will return NULL. | |
198 scoped_refptr<ExtensionProxy> InstallExtension(const FilePath& extension_path, | |
199 bool with_ui); | |
200 | |
201 // Gets the next extension test result in |result|. Returns false if there | 193 // Gets the next extension test result in |result|. Returns false if there |
202 // was a problem sending the result querying RPC. | 194 // was a problem sending the result querying RPC. |
203 bool GetExtensionTestResult(bool* result, std::string* message); | 195 bool GetExtensionTestResult(bool* result, std::string* message); |
204 | 196 |
205 // Resets to the default theme. Returns true on success. | 197 // Resets to the default theme. Returns true on success. |
206 bool ResetToDefaultTheme(); | 198 bool ResetToDefaultTheme(); |
207 | 199 |
208 // Generic pattern for sending automation requests. | 200 // Generic pattern for sending automation requests. |
209 bool SendJSONRequest(const std::string& request, | 201 bool SendJSONRequest(const std::string& request, |
210 int timeout_ms, | 202 int timeout_ms, |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
322 | 314 |
323 // Delay to let the browser execute the command. | 315 // Delay to let the browser execute the command. |
324 base::TimeDelta action_timeout_; | 316 base::TimeDelta action_timeout_; |
325 | 317 |
326 base::PlatformThreadId listener_thread_id_; | 318 base::PlatformThreadId listener_thread_id_; |
327 | 319 |
328 DISALLOW_COPY_AND_ASSIGN(AutomationProxy); | 320 DISALLOW_COPY_AND_ASSIGN(AutomationProxy); |
329 }; | 321 }; |
330 | 322 |
331 #endif // CHROME_TEST_AUTOMATION_AUTOMATION_PROXY_H_ | 323 #endif // CHROME_TEST_AUTOMATION_AUTOMATION_PROXY_H_ |
OLD | NEW |