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 """Finds desktop browsers that can be controlled by chrome_remote_control.""" |
| 5 |
4 import logging | 6 import logging |
5 import os as real_os | 7 import os as real_os |
6 import sys as real_sys | 8 import sys as real_sys |
7 import subprocess as real_subprocess | 9 import subprocess as real_subprocess |
8 | 10 |
9 from chrome_remote_control import browser | 11 from chrome_remote_control import browser |
10 from chrome_remote_control import desktop_browser_backend | 12 from chrome_remote_control import desktop_browser_backend |
11 from chrome_remote_control import possible_browser | 13 from chrome_remote_control import possible_browser |
12 | 14 |
13 """Finds desktop browsers that can be controlled by chrome_remote_control.""" | |
14 | |
15 ALL_BROWSER_TYPES = ','.join([ | 15 ALL_BROWSER_TYPES = ','.join([ |
16 'exact', | 16 'exact', |
17 'release', | 17 'release', |
18 'debug', | 18 'debug', |
19 'canary', | 19 'canary', |
20 'content-shell-debug', | 20 'content-shell-debug', |
21 'content-shell-release', | 21 'content-shell-release', |
22 'system']) | 22 'system']) |
23 | 23 |
24 class PossibleDesktopBrowser(possible_browser.PossibleBrowser): | 24 class PossibleDesktopBrowser(possible_browser.PossibleBrowser): |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
131 if os.path.exists(win_system): | 131 if os.path.exists(win_system): |
132 browsers.append(PossibleDesktopBrowser('system', options, | 132 browsers.append(PossibleDesktopBrowser('system', options, |
133 win_system, False)) | 133 win_system, False)) |
134 | 134 |
135 if len(browsers) and not has_display: | 135 if len(browsers) and not has_display: |
136 logging.warning('Found (%s), but you have a DISPLAY environment set.' % | 136 logging.warning('Found (%s), but you have a DISPLAY environment set.' % |
137 ','.join([b.browser_type for b in browsers])) | 137 ','.join([b.browser_type for b in browsers])) |
138 return [] | 138 return [] |
139 | 139 |
140 return browsers | 140 return browsers |
OLD | NEW |