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 from skypy.skyserver import SkyServer | 6 from skypy.skyserver import SkyServer |
7 import argparse | 7 import argparse |
8 import json | 8 import json |
9 import logging | 9 import logging |
10 import os | 10 import os |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 content_handlers = ['%s,%s' % (mime_type, 'mojo:sky_viewer') | 112 content_handlers = ['%s,%s' % (mime_type, 'mojo:sky_viewer') |
113 for mime_type in SUPPORTED_MIME_TYPES] | 113 for mime_type in SUPPORTED_MIME_TYPES] |
114 | 114 |
115 remote_command_port = self.pids.get('remote_sky_command_port', self.pids
['sky_command_port']) | 115 remote_command_port = self.pids.get('remote_sky_command_port', self.pids
['sky_command_port']) |
116 remote_server_port = self.pids.get('remote_sky_server_port', self.pids['
sky_server_port']) | 116 remote_server_port = self.pids.get('remote_sky_server_port', self.pids['
sky_server_port']) |
117 | 117 |
118 shell_args = [ | 118 shell_args = [ |
119 '--v=1', | 119 '--v=1', |
120 '--content-handlers=%s' % ','.join(content_handlers), | 120 '--content-handlers=%s' % ','.join(content_handlers), |
121 '--url-mappings=mojo:window_manager=mojo:kiosk_wm', | 121 '--url-mappings=mojo:window_manager=mojo:kiosk_wm', |
122 '--args-for=mojo:sky_debugger %d' % remote_command_port, | 122 '--args-for=mojo:debugger %d' % remote_command_port, |
123 'mojo:sky_debugger', | 123 'mojo:debugger', |
124 ] | 124 ] |
125 | 125 |
126 if args.url_or_path: | 126 if args.url_or_path: |
127 shell_args.append( | 127 shell_args.append( |
128 '--args-for=mojo:window_manager %s' % self._url_from_args(args)) | 128 '--args-for=mojo:window_manager %s' % self._url_from_args(args)) |
129 | 129 |
130 if args.trace_startup: | 130 if args.trace_startup: |
131 shell_args.append('--trace-startup') | 131 shell_args.append('--trace-startup') |
132 | 132 |
133 # Map all mojo: urls to http: urls using the --origin command. | 133 # Map all mojo: urls to http: urls using the --origin command. |
(...skipping 504 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
638 load_parser.set_defaults(func=self.load_command) | 638 load_parser.set_defaults(func=self.load_command) |
639 | 639 |
640 args = parser.parse_args() | 640 args = parser.parse_args() |
641 args.func(args) | 641 args.func(args) |
642 | 642 |
643 self._write_pid_file(PID_FILE_PATH, self.pids) | 643 self._write_pid_file(PID_FILE_PATH, self.pids) |
644 | 644 |
645 | 645 |
646 if __name__ == '__main__': | 646 if __name__ == '__main__': |
647 SkyDebugger().main() | 647 SkyDebugger().main() |
OLD | NEW |