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 import logging | 4 import logging |
5 import os as real_os | 5 import os as real_os |
6 import sys as real_sys | 6 import sys as real_sys |
7 import subprocess as real_subprocess | 7 import subprocess as real_subprocess |
8 | 8 |
9 import browser | 9 import browser |
10 import desktop_browser_backend | 10 import desktop_browser_backend |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 options.browser_executable, False)) | 56 options.browser_executable, False)) |
57 | 57 |
58 # Look for a browser in the standard chrome build locations. | 58 # Look for a browser in the standard chrome build locations. |
59 if options.chrome_root: | 59 if options.chrome_root: |
60 chrome_root = options.chrome_root | 60 chrome_root = options.chrome_root |
61 else: | 61 else: |
62 chrome_root = os.path.join(os.path.dirname(__file__), '..', '..', '..') | 62 chrome_root = os.path.join(os.path.dirname(__file__), '..', '..', '..') |
63 | 63 |
64 if sys.platform == 'darwin': | 64 if sys.platform == 'darwin': |
65 chromium_app_name = 'Chromium.app/Contents/MacOS/Chromium' | 65 chromium_app_name = 'Chromium.app/Contents/MacOS/Chromium' |
66 content_shell_app_name = 'Content\ Shell.app/Contents/MacOS/Content Shell' | 66 content_shell_app_name = 'Content Shell.app/Contents/MacOS/Content Shell' |
67 elif sys.platform.startswith('linux'): | 67 elif sys.platform.startswith('linux'): |
68 chromium_app_name = 'chrome' | 68 chromium_app_name = 'chrome' |
69 content_shell_app_name = 'content_shell' | 69 content_shell_app_name = 'content_shell' |
70 elif sys.platform.startswith('win'): | 70 elif sys.platform.startswith('win'): |
71 chromium_app_name = 'chrome.exe' | 71 chromium_app_name = 'chrome.exe' |
72 content_shell_app_name = 'content_shell.exe' | 72 content_shell_app_name = 'content_shell.exe' |
73 else: | 73 else: |
74 raise Exception('Platform not recognized') | 74 raise Exception('Platform not recognized') |
75 | 75 |
76 if sys.platform.startswith('win'): | 76 if sys.platform.startswith('win'): |
(...skipping 54 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.type for b in browsers])) | 137 ','.join([b.type for b in browsers])) |
138 return [] | 138 return [] |
139 | 139 |
140 return browsers | 140 return browsers |
OLD | NEW |