| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 | 44 |
| 45 // If set, the profiles in this path are copied | 45 // If set, the profiles in this path are copied |
| 46 // into the user data directory for the test. | 46 // into the user data directory for the test. |
| 47 base::FilePath template_user_data; | 47 base::FilePath template_user_data; |
| 48 | 48 |
| 49 // Called just before starting the browser to allow any setup of the | 49 // Called just before starting the browser to allow any setup of the |
| 50 // profile for the run time environment. | 50 // profile for the run time environment. |
| 51 base::Closure setup_profile_callback; | 51 base::Closure setup_profile_callback; |
| 52 | 52 |
| 53 // Command line to launch the browser. | 53 // Command line to launch the browser. |
| 54 CommandLine command; | 54 base::CommandLine command; |
| 55 | 55 |
| 56 // Should we supply the testing channel id on the command line? | 56 // Should we supply the testing channel id on the command line? |
| 57 bool include_testing_id; | 57 bool include_testing_id; |
| 58 | 58 |
| 59 // If true, the window is shown. Otherwise it is hidden. | 59 // If true, the window is shown. Otherwise it is hidden. |
| 60 bool show_window; | 60 bool show_window; |
| 61 }; | 61 }; |
| 62 | 62 |
| 63 ProxyLauncher(); | 63 ProxyLauncher(); |
| 64 | 64 |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 141 virtual std::string PrefixedChannelID() const = 0; | 141 virtual std::string PrefixedChannelID() const = 0; |
| 142 | 142 |
| 143 // Paired with ConnectToRunningBrowser(). | 143 // Paired with ConnectToRunningBrowser(). |
| 144 // Disconnects the testing IPC from the browser. | 144 // Disconnects the testing IPC from the browser. |
| 145 void DisconnectFromRunningBrowser(); | 145 void DisconnectFromRunningBrowser(); |
| 146 | 146 |
| 147 private: | 147 private: |
| 148 bool WaitForBrowserLaunch(bool wait_for_initial_loads) WARN_UNUSED_RESULT; | 148 bool WaitForBrowserLaunch(bool wait_for_initial_loads) WARN_UNUSED_RESULT; |
| 149 | 149 |
| 150 // Prepare command line that will be used to launch the child browser process. | 150 // Prepare command line that will be used to launch the child browser process. |
| 151 void PrepareTestCommandline(CommandLine* command_line, | 151 void PrepareTestCommandline(base::CommandLine* command_line, |
| 152 bool include_testing_id); | 152 bool include_testing_id); |
| 153 | 153 |
| 154 bool LaunchBrowserHelper(const LaunchState& state, | 154 bool LaunchBrowserHelper(const LaunchState& state, |
| 155 bool main_launch, | 155 bool main_launch, |
| 156 bool wait, | 156 bool wait, |
| 157 base::ProcessHandle* process) WARN_UNUSED_RESULT; | 157 base::ProcessHandle* process) WARN_UNUSED_RESULT; |
| 158 | 158 |
| 159 scoped_ptr<AutomationProxy> automation_proxy_; | 159 scoped_ptr<AutomationProxy> automation_proxy_; |
| 160 | 160 |
| 161 // We use a temporary directory for profile to avoid issues with being | 161 // We use a temporary directory for profile to avoid issues with being |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 243 | 243 |
| 244 protected: | 244 protected: |
| 245 std::string channel_id_; // Channel id of automation proxy. | 245 std::string channel_id_; // Channel id of automation proxy. |
| 246 bool disconnect_on_failure_; // True if we disconnect on IPC channel failure. | 246 bool disconnect_on_failure_; // True if we disconnect on IPC channel failure. |
| 247 | 247 |
| 248 private: | 248 private: |
| 249 DISALLOW_COPY_AND_ASSIGN(AnonymousProxyLauncher); | 249 DISALLOW_COPY_AND_ASSIGN(AnonymousProxyLauncher); |
| 250 }; | 250 }; |
| 251 | 251 |
| 252 #endif // CHROME_TEST_AUTOMATION_PROXY_LAUNCHER_H_ | 252 #endif // CHROME_TEST_AUTOMATION_PROXY_LAUNCHER_H_ |
| OLD | NEW |