| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_PROXY_LAUNCHER_H_ | 5 #ifndef CHROME_TEST_AUTOMATION_PROXY_LAUNCHER_H_ |
| 6 #define CHROME_TEST_AUTOMATION_PROXY_LAUNCHER_H_ | 6 #define CHROME_TEST_AUTOMATION_PROXY_LAUNCHER_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 }; | 35 }; |
| 36 | 36 |
| 37 // Different ways to quit the browser. | 37 // Different ways to quit the browser. |
| 38 enum ShutdownType { | 38 enum ShutdownType { |
| 39 WINDOW_CLOSE, | 39 WINDOW_CLOSE, |
| 40 USER_QUIT, | 40 USER_QUIT, |
| 41 SESSION_ENDING, | 41 SESSION_ENDING, |
| 42 }; | 42 }; |
| 43 | 43 |
| 44 // POD containing state variables that determine how to launch browser. | 44 // POD containing state variables that determine how to launch browser. |
| 45 typedef struct { | 45 struct LaunchState { |
| 46 // If true the profile is cleared before launching. | 46 // If true the profile is cleared before launching. |
| 47 bool clear_profile; | 47 bool clear_profile; |
| 48 | 48 |
| 49 // If set, the profiles in this path are copied | 49 // If set, the profiles in this path are copied |
| 50 // into the user data directory for the test. | 50 // into the user data directory for the test. |
| 51 FilePath& template_user_data; | 51 FilePath template_user_data; |
| 52 | 52 |
| 53 // Profile theme type. | 53 // Profile theme type. |
| 54 ProfileType profile_type; | 54 ProfileType profile_type; |
| 55 | 55 |
| 56 // Path to the browser executable. | 56 // Path to the browser executable. |
| 57 FilePath browser_directory; | 57 FilePath browser_directory; |
| 58 | 58 |
| 59 // Command line arguments passed to the browser. | 59 // Command line arguments passed to the browser. |
| 60 CommandLine& arguments; | 60 CommandLine arguments; |
| 61 | 61 |
| 62 // Should we supply the testing channel id on the command line? | 62 // Should we supply the testing channel id on the command line? |
| 63 bool include_testing_id; | 63 bool include_testing_id; |
| 64 | 64 |
| 65 // If true, the window is shown. Otherwise it is hidden. | 65 // If true, the window is shown. Otherwise it is hidden. |
| 66 bool show_window; | 66 bool show_window; |
| 67 } LaunchState; | 67 }; |
| 68 | 68 |
| 69 ProxyLauncher(); | 69 ProxyLauncher(); |
| 70 | 70 |
| 71 virtual ~ProxyLauncher(); | 71 virtual ~ProxyLauncher(); |
| 72 | 72 |
| 73 // Creates an automation proxy. | 73 // Creates an automation proxy. |
| 74 virtual AutomationProxy* CreateAutomationProxy( | 74 virtual AutomationProxy* CreateAutomationProxy( |
| 75 int execution_timeout) = 0; | 75 int execution_timeout) = 0; |
| 76 | 76 |
| 77 // Launches the browser if needed and establishes a connection with it. | 77 // Launches the browser if needed and establishes a connection with it. |
| (...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 324 | 324 |
| 325 protected: | 325 protected: |
| 326 std::string channel_id_; // Channel id of automation proxy. | 326 std::string channel_id_; // Channel id of automation proxy. |
| 327 bool disconnect_on_failure_; // True if we disconnect on IPC channel failure. | 327 bool disconnect_on_failure_; // True if we disconnect on IPC channel failure. |
| 328 | 328 |
| 329 private: | 329 private: |
| 330 DISALLOW_COPY_AND_ASSIGN(AnonymousProxyLauncher); | 330 DISALLOW_COPY_AND_ASSIGN(AnonymousProxyLauncher); |
| 331 }; | 331 }; |
| 332 | 332 |
| 333 #endif // CHROME_TEST_AUTOMATION_PROXY_LAUNCHER_H_ | 333 #endif // CHROME_TEST_AUTOMATION_PROXY_LAUNCHER_H_ |
| OLD | NEW |