Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(428)

Unified Diff: chrome/test/automation/proxy_launcher.h

Issue 7523060: Let pyauto create an attached webdriver instance to manipulate web pages. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: move bools into struct Created 9 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/test/automation/proxy_launcher.h
diff --git a/chrome/test/automation/proxy_launcher.h b/chrome/test/automation/proxy_launcher.h
index 811366ba80c23e6b490c2222165a411e473d105c..09b13f4573b203e4875e178dd7a951fb84d0c0f9 100644
--- a/chrome/test/automation/proxy_launcher.h
+++ b/chrome/test/automation/proxy_launcher.h
@@ -286,11 +286,22 @@ class ProxyLauncher {
// The channel id of the proxy is a constant specified by kInterfacePath.
class NamedProxyLauncher : public ProxyLauncher {
public:
- // If launch_browser is true, launches Chrome with named interface enabled.
- // Otherwise, there should be an existing instance the proxy can connect to.
+ struct InitParams {
+ // True if the browser should be launched. If false, this will connect
+ // to an already started Chrome.
+ bool launch_browser;
+
+ // True if we should disconnect on an IPC failure.
+ bool disconnect_on_failure;
+
+ // True if we should wait for Chrome's server channel to be initialized
+ // and listening. Only set to false if it is guaranteed the server channel
+ // is already listening.
+ bool wait_for_server_channel;
Nirnimesh 2011/08/01 19:21:24 Why is this necessary? In what case would you set
kkania 2011/08/02 15:10:44 This is necessary because the code for waiting for
+ };
+
NamedProxyLauncher(const std::string& channel_id,
- bool launch_browser,
- bool disconnect_on_failure);
+ const InitParams& params);
virtual AutomationProxy* CreateAutomationProxy(
int execution_timeout) OVERRIDE;
@@ -301,9 +312,10 @@ class NamedProxyLauncher : public ProxyLauncher {
virtual std::string PrefixedChannelID() const OVERRIDE;
protected:
- std::string channel_id_; // Channel id of automation proxy.
- bool launch_browser_; // True if we should launch the browser too.
- bool disconnect_on_failure_; // True if we disconnect on IPC channel failure.
+ std::string channel_id_; // Channel id of automation proxy.
+ bool launch_browser_; // True if we should launch the browser too.
+ bool disconnect_on_failure_; // True if we disconnect on channel failure.
+ bool wait_for_server_channel_; // True if we should wait for server channel.
private:
DISALLOW_COPY_AND_ASSIGN(NamedProxyLauncher);

Powered by Google App Engine
This is Rietveld 408576698