Index: tools/chrome_remote_control/chrome_remote_control/browser_options.py |
diff --git a/tools/chrome_remote_control/chrome_remote_control/browser_options.py b/tools/chrome_remote_control/chrome_remote_control/browser_options.py |
new file mode 100644 |
index 0000000000000000000000000000000000000000..a850a9d33cf675d6676516d920c208860231fd22 |
--- /dev/null |
+++ b/tools/chrome_remote_control/chrome_remote_control/browser_options.py |
@@ -0,0 +1,38 @@ |
+# Copyright (c) 2012 The Chromium Authors. All rights reserved. |
+# Use of this source code is governed by a BSD-style license that can be |
+# found in the LICENSE file. |
+ |
+import optparse |
+ |
+class BrowserOptions(object): |
+ @staticmethod |
+ def CreateParser(usage=None): |
+ parser = optparse.OptionParser(usage=usage) |
+ parser.add_option('--browser-executable', action="store_true", |
+ dest="browser_executable", |
+ help="The exact browser to run") |
+ parser.add_option('--dont-override-profile', action="store_true", |
+ dest="dont_override_profile", |
+ help="Uses the regular user profile instead of a clean one") |
+ parser.add_option('--debug', action="store_true", |
+ dest="debug", |
+ help="Uses debug build if found; otherwise, looks for release build.") |
+ parser.add_option('--canary', action="store_true", |
+ dest="canary", help="Uses canary channel if found") |
+ real_parse = parser.parse_args |
+ def ParseArgs(args = None): |
+ options = BrowserOptions() |
+ return real_parse(args, options) |
+ parser.parse_args = ParseArgs |
+ return parser |
+ |
+ def __init__(self): |
+ self.browser_executable = None |
+ self.dont_override_profile = False |
+ self.debug = False |
+ self.stable = False |
+ self.canary = False |
+ self.hide_stdout = True |
+ self.remote_debugging_port = 9273 |
+ self.args = [] |
+ |