| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # Copyright 2014 The Chromium Authors. All rights reserved. | 2 # Copyright 2014 The Chromium Authors. All rights reserved. |
| 3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
| 4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
| 5 | 5 |
| 6 import argparse | 6 import argparse |
| 7 import logging | 7 import logging |
| 8 import sys | 8 import sys |
| 9 | 9 |
| 10 from devtoolslib.android_shell import AndroidShell | 10 from devtoolslib.android_shell import AndroidShell |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 # Desktop-only arguments. | 76 # Desktop-only arguments. |
| 77 parser.add_argument('--use-osmesa', action='store_true', | 77 parser.add_argument('--use-osmesa', action='store_true', |
| 78 help='(linux-only) Configure the native viewport service ' | 78 help='(linux-only) Configure the native viewport service ' |
| 79 'for off-screen rendering.') | 79 'for off-screen rendering.') |
| 80 | 80 |
| 81 launcher_args, args = parser.parse_known_args() | 81 launcher_args, args = parser.parse_known_args() |
| 82 mojo_paths, _ = paths.infer_mojo_paths(launcher_args.android, | 82 mojo_paths, _ = paths.infer_mojo_paths(launcher_args.android, |
| 83 launcher_args.debug, | 83 launcher_args.debug, |
| 84 launcher_args.target_cpu) | 84 launcher_args.target_cpu) |
| 85 if mojo_paths: | 85 if mojo_paths: |
| 86 adb_path = mojo_paths['adb'] | 86 if launcher_args.android: |
| 87 adb_path = mojo_paths['adb'] |
| 87 shell_binary_path = mojo_paths['shell'] | 88 shell_binary_path = mojo_paths['shell'] |
| 88 local_origin_path = mojo_paths['build'] | 89 local_origin_path = mojo_paths['build'] |
| 89 if launcher_args.verbose: | 90 if launcher_args.verbose: |
| 90 print 'Running within a Mojo checkout:' | 91 print 'Running within a Mojo checkout:' |
| 91 print ' - using the locally built shell at ' + shell_binary_path | 92 print ' - using the locally built shell at ' + shell_binary_path |
| 92 print ' - using the default origin of ' + local_origin_path | 93 print ' - using the default origin of ' + local_origin_path |
| 93 else: | 94 else: |
| 94 if launcher_args.android: | 95 if launcher_args.android: |
| 95 adb_path = 'adb' | 96 adb_path = 'adb' |
| 96 shell_binary_path = None | 97 shell_binary_path = None |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 145 | 146 |
| 146 if launcher_args.verbose: | 147 if launcher_args.verbose: |
| 147 print "Shell arguments: " + str(args) | 148 print "Shell arguments: " + str(args) |
| 148 | 149 |
| 149 shell.Run(args) | 150 shell.Run(args) |
| 150 return 0 | 151 return 0 |
| 151 | 152 |
| 152 | 153 |
| 153 if __name__ == "__main__": | 154 if __name__ == "__main__": |
| 154 sys.exit(main()) | 155 sys.exit(main()) |
| OLD | NEW |