| 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 os | 6 import os |
| 7 import subprocess | 7 import subprocess |
| 8 import sys |
| 8 | 9 |
| 9 build_directory = 'out' | |
| 10 config_directory = 'Debug' | |
| 11 | 10 |
| 12 mojo_shell = os.path.abspath(os.path.join(__file__, os.pardir, os.pardir, | 11 BUILD_DIRECTORY = 'out' |
| 13 os.pardir, build_directory, config_directory, 'mojo_shell')) | 12 CONFIG_DIRECTORY = 'Debug' |
| 13 MOJO_SHELL_PATH = os.path.abspath(os.path.join(__file__, os.pardir, os.pardir, |
| 14 os.pardir, BUILD_DIRECTORY, CONFIG_DIRECTORY, 'mojo_shell')) |
| 14 | 15 |
| 15 subprocess.call([ | 16 def main(args): |
| 16 mojo_shell, | 17 shell_command = [ |
| 17 '--content-handlers=text/html,mojo://sky_viewer/', | 18 MOJO_SHELL_PATH, |
| 18 '--url-mappings=mojo:window_manager=mojo:sky_debugger', | 19 '--v=1', |
| 19 'mojo:window_manager', | 20 '--content-handlers=text/html,mojo://sky_viewer/', |
| 20 ]) | 21 '--url-mappings=mojo:window_manager=mojo:sky_debugger', |
| 22 'mojo:window_manager', |
| 23 ] |
| 24 if args: |
| 25 prompt_args = '--args-for=mojo://sky_debugger_prompt/ %s' % args[0] |
| 26 shell_command.append(prompt_args) |
| 27 subprocess.check_call(shell_command) |
| 28 |
| 29 |
| 30 if __name__ == '__main__': |
| 31 main(sys.argv[1:]) |
| OLD | NEW |