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

Side by Side Diff: sky/tools/skydb

Issue 672363002: Make skydb load examples/home.sky by default. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 2 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
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 import os 6 import os
7 import subprocess 7 import subprocess
8 import sys 8 import sys
9 9
10 10
11 BUILD_DIRECTORY = 'out' 11 BUILD_DIRECTORY = 'out'
12 CONFIG_DIRECTORY = 'Debug' 12 CONFIG_DIRECTORY = 'Debug'
13 MOJO_SHELL_PATH = os.path.abspath(os.path.join(__file__, os.pardir, os.pardir, 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 os.pardir, BUILD_DIRECTORY, CONFIG_DIRECTORY, 'mojo_shell'))
15 15
16 SUPPORTED_MIME_TYPES = [
Hixie 2014/10/23 21:56:20 this is temporary, right? Long term we don't want
17 'text/html',
18 'text/plain',
19 ]
20
16 def main(args): 21 def main(args):
22 content_handlers = ['%s,%s' % (mime_type, 'mojo://sky_viewer/')
23 for mime_type in SUPPORTED_MIME_TYPES]
17 shell_command = [ 24 shell_command = [
18 MOJO_SHELL_PATH, 25 MOJO_SHELL_PATH,
19 '--v=1', 26 '--v=1',
20 '--content-handlers=text/html,mojo://sky_viewer/', 27 '--content-handlers=%s' % ','.join(content_handlers),
21 '--url-mappings=mojo:window_manager=mojo:sky_debugger', 28 '--url-mappings=mojo:window_manager=mojo:sky_debugger',
22 'mojo:window_manager', 29 'mojo:window_manager',
23 ] 30 ]
24 if args: 31 if args:
25 prompt_args = '--args-for=mojo://sky_debugger_prompt/ %s' % args[0] 32 prompt_args = '--args-for=mojo://sky_debugger_prompt/ %s' % args[0]
26 shell_command.append(prompt_args) 33 shell_command.append(prompt_args)
27 subprocess.check_call(shell_command) 34 subprocess.check_call(shell_command)
28 35
29 36
30 if __name__ == '__main__': 37 if __name__ == '__main__':
31 main(sys.argv[1:]) 38 main(sys.argv[1:])
OLDNEW
« sky/tools/debugger/prompt/prompt.cc ('K') | « sky/tools/debugger/prompt/prompt.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698