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 android browsers that can be controlled by chrome_remote_control.""" |
| 5 |
4 import os as real_os | 6 import os as real_os |
5 import subprocess as real_subprocess | 7 import subprocess as real_subprocess |
6 import logging | 8 import logging |
7 import re | 9 import re |
8 | 10 |
9 from chrome_remote_control import android_browser_backend | 11 from chrome_remote_control import android_browser_backend |
10 import chrome_remote_control.adb_commands as real_adb_commands | 12 import chrome_remote_control.adb_commands as real_adb_commands |
11 from chrome_remote_control import browser | 13 from chrome_remote_control import browser |
12 from chrome_remote_control import possible_browser | 14 from chrome_remote_control import possible_browser |
13 | 15 |
14 | |
15 """Finds android browsers that can be controlled by chrome_remote_control.""" | |
16 | |
17 ALL_BROWSER_TYPES = ','.join([ | 16 ALL_BROWSER_TYPES = ','.join([ |
18 'android-content-shell', | 17 'android-content-shell', |
19 'android-chrome', | 18 'android-chrome', |
20 'android-jb-system-chrome', | 19 'android-jb-system-chrome', |
21 ]) | 20 ]) |
22 | 21 |
23 CHROME_PACKAGE = 'com.google.android.apps.chrome' | 22 CHROME_PACKAGE = 'com.google.android.apps.chrome' |
24 CHROME_ACTIVITY = '.Main' | 23 CHROME_ACTIVITY = '.Main' |
25 CHROME_COMMAND_LINE = '/data/local/chrome-command-line' | 24 CHROME_COMMAND_LINE = '/data/local/chrome-command-line' |
26 CHROME_DEVTOOLS_REMOTE_PORT = 'localabstract:chrome_devtools_remote' | 25 CHROME_DEVTOOLS_REMOTE_PORT = 'localabstract:chrome_devtools_remote' |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
141 logging.warn('chrome_remote_control detected an android device. However,') | 140 logging.warn('chrome_remote_control detected an android device. However,') |
142 logging.warn('Chrome\'s port-forwarder app is not installed on the device.') | 141 logging.warn('Chrome\'s port-forwarder app is not installed on the device.') |
143 logging.warn('To build:') | 142 logging.warn('To build:') |
144 logging.warn(' make -j16 out/$BUILDTYPE/forwarder') | 143 logging.warn(' make -j16 out/$BUILDTYPE/forwarder') |
145 logging.warn('And then install it:') | 144 logging.warn('And then install it:') |
146 logging.warn(' %s', adb_commands.HowToInstallForwarder()) | 145 logging.warn(' %s', adb_commands.HowToInstallForwarder()) |
147 logging.warn('') | 146 logging.warn('') |
148 logging.warn('') | 147 logging.warn('') |
149 return [] | 148 return [] |
150 return possible_browsers | 149 return possible_browsers |
OLD | NEW |