| 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 import devtools | 10 import devtools |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 | 57 |
| 58 config = Config(target_os=Config.OS_ANDROID, | 58 config = Config(target_os=Config.OS_ANDROID, |
| 59 target_cpu=launcher_args.target_cpu, | 59 target_cpu=launcher_args.target_cpu, |
| 60 is_debug=launcher_args.debug) | 60 is_debug=launcher_args.debug) |
| 61 paths = Paths(config) | 61 paths = Paths(config) |
| 62 verbose_pipe = sys.stdout if launcher_args.verbose else None | 62 verbose_pipe = sys.stdout if launcher_args.verbose else None |
| 63 shell = AndroidShell(paths.adb_path, launcher_args.target_device, | 63 shell = AndroidShell(paths.adb_path, launcher_args.target_device, |
| 64 logcat_tags=launcher_args.logcat_tags, | 64 logcat_tags=launcher_args.logcat_tags, |
| 65 verbose_pipe=verbose_pipe) | 65 verbose_pipe=verbose_pipe) |
| 66 shell.InstallApk(paths.target_mojo_shell_path) | 66 shell.InstallApk(paths.target_mojo_shell_path) |
| 67 args.append("--origin=" + launcher_args.origin if launcher_args.origin else | 67 |
| 68 shell.SetUpLocalOrigin(paths.build_dir)) | |
| 69 args = shell_arguments.RewriteMapOriginParameters(shell, args) | 68 args = shell_arguments.RewriteMapOriginParameters(shell, args) |
| 69 if launcher_args.origin: |
| 70 args.append("--origin=" + launcher_args.origin) |
| 71 else: |
| 72 args.extend(shell_arguments.ConfigureLocalOrigin(shell, paths.build_dir)) |
| 70 if launcher_args.debugger: | 73 if launcher_args.debugger: |
| 71 args.extend(shell_arguments.ConfigureDebugger(shell)) | 74 args.extend(shell_arguments.ConfigureDebugger(shell)) |
| 75 |
| 72 shell.Run(args) | 76 shell.Run(args) |
| 73 return 0 | 77 return 0 |
| 74 | 78 |
| 75 | 79 |
| 76 if __name__ == "__main__": | 80 if __name__ == "__main__": |
| 77 sys.exit(main()) | 81 sys.exit(main()) |
| OLD | NEW |