Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(108)

Side by Side Diff: sky/tools/skydb

Issue 837283002: Mojo JS Bindings: merge Application, Shell, ServiceProvider with Sky (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Commit missing file Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « sky/tests/services/network.sky ('k') | sky/viewer/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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.paths import Paths 6 from skypy.paths import Paths
7 from skypy.skyserver import SkyServer 7 from skypy.skyserver import SkyServer
8 import argparse 8 import argparse
9 import logging 9 import logging
10 import os 10 import os
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 return os.environ.get('CHROME_REMOTE_DESKTOP_SESSION', False) 47 return os.environ.get('CHROME_REMOTE_DESKTOP_SESSION', False)
48 48
49 def main(self): 49 def main(self):
50 logging.basicConfig(level=logging.INFO) 50 logging.basicConfig(level=logging.INFO)
51 51
52 parser = argparse.ArgumentParser(description='Sky launcher/debugger') 52 parser = argparse.ArgumentParser(description='Sky launcher/debugger')
53 parser.add_argument('--gdb', action='store_true') 53 parser.add_argument('--gdb', action='store_true')
54 parser.add_argument('--use-osmesa', action='store_true', 54 parser.add_argument('--use-osmesa', action='store_true',
55 default=self._in_chromoting()) 55 default=self._in_chromoting())
56 parser.add_argument('url_or_path', nargs='?', type=str) 56 parser.add_argument('url_or_path', nargs='?', type=str)
57 parser.add_argument('--show-command', action='store_true',
58 help='Display the shell command and exit')
57 configuration.add_arguments(parser) 59 configuration.add_arguments(parser)
58 args = parser.parse_args() 60 args = parser.parse_args()
59 61
60 self.paths = Paths(os.path.join('out', args.configuration)) 62 self.paths = Paths(os.path.join('out', args.configuration))
61 63
62 content_handlers = ['%s,%s' % (mime_type, 'mojo:sky_viewer') 64 content_handlers = ['%s,%s' % (mime_type, 'mojo:sky_viewer')
63 for mime_type in SUPPORTED_MIME_TYPES] 65 for mime_type in SUPPORTED_MIME_TYPES]
64 shell_command = [ 66 shell_command = [
65 self.paths.mojo_shell_path, 67 self.paths.mojo_shell_path,
66 '--v=1', 68 '--v=1',
(...skipping 15 matching lines...) Expand all
82 84
83 if args.gdb: 85 if args.gdb:
84 shell_command = ['gdb', '--args'] + shell_command 86 shell_command = ['gdb', '--args'] + shell_command
85 87
86 if server_root: 88 if server_root:
87 with SkyServer(self.paths, HTTP_PORT, args.configuration, 89 with SkyServer(self.paths, HTTP_PORT, args.configuration,
88 server_root): 90 server_root):
89 subprocess.check_call(shell_command) 91 subprocess.check_call(shell_command)
90 else: 92 else:
91 subprocess.check_call(shell_command) 93 subprocess.check_call(shell_command)
94 if args.show_command:
95 print " ".join(shell_command)
96 else:
97 subprocess.check_call(shell_command)
98
99 def shutdown(self):
eseidel 2015/01/08 19:30:29 This code looks unused?
hansmuller1 2015/01/08 21:31:14 It looks the result of a bad merge (mine). You rem
100 print "Quitting"
101 if self._sky_server:
102 self._sky_server.terminate()
92 103
93 104
94 if __name__ == '__main__': 105 if __name__ == '__main__':
95 SkyDebugger().main() 106 SkyDebugger().main()
OLDNEW
« no previous file with comments | « sky/tests/services/network.sky ('k') | sky/viewer/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698