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

Unified Diff: mojo/devtools/common/mojo_run

Issue 1283733002: Add mojo_run --embed APP_URL and update wm urls. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Improve the comments. Created 5 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « mojo/devtools/common/README.md ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/devtools/common/mojo_run
diff --git a/mojo/devtools/common/mojo_run b/mojo/devtools/common/mojo_run
index 554eeabb90958991f40688c6fefce6611069e6af..541afb9d669a1f31855a07d5d1a41e80e97ba83d 100755
--- a/mojo/devtools/common/mojo_run
+++ b/mojo/devtools/common/mojo_run
@@ -36,7 +36,10 @@ Any arguments not recognized by the script will be passed on as shell arguments.
# Port on which the mojo:debugger http server will be available on the host
# machine.
_MOJO_DEBUGGER_PORT = 7777
-_DEFAULT_WINDOW_MANAGER = "mojo:kiosk_wm"
+_DEFAULT_WM = 'https://core.mojoapps.io/kiosk_wm.mojo'
+
+_LEGACY_WM_URL = 'mojo:window_manager'
+_WM_URL = 'https://core.mojoapps.io/window_manager.mojo'
def _configure_debugger(shell):
@@ -57,12 +60,14 @@ def main():
parser = argparse.ArgumentParser(usage=_USAGE, description=_DESCRIPTION)
shell_config.add_shell_arguments(parser)
- parser.add_argument('--no-debugger', action="store_true",
- help='Do not spawn mojo:debugger.')
- parser.add_argument('--window-manager', default=_DEFAULT_WINDOW_MANAGER,
+ parser.add_argument('--embed', type=str,
+ help='Url to be embedded in the window manager.')
+ parser.add_argument('--window-manager', default=_DEFAULT_WM,
help='Window manager app to be mapped as '
'mojo:window_manager. By default it is ' +
- _DEFAULT_WINDOW_MANAGER)
+ _DEFAULT_WM)
+ parser.add_argument('--no-debugger', action="store_true",
+ help='Do not spawn mojo:debugger.')
script_args, shell_args = parser.parse_known_args()
@@ -73,6 +78,16 @@ def main():
print e
return 1
+ shell_args = shell_arguments.append_to_argument(shell_args, '--url-mappings=',
+ '%s=%s' % (_LEGACY_WM_URL,
+ script_args.window_manager))
+ shell_args = shell_arguments.append_to_argument(shell_args, '--url-mappings=',
+ '%s=%s' % (_WM_URL,
+ script_args.window_manager))
+
+ if script_args.embed:
+ shell_args.append('%s %s' % (script_args.window_manager, script_args.embed))
+
if not script_args.no_debugger:
if script_args.verbose:
print 'Spawning mojo:debugger, use `mojo_debug` to inspect the shell.'
@@ -80,10 +95,6 @@ def main():
print ' pass --no-debugger to skip spawning mojo:debugger.'
shell_args.extend(_configure_debugger(shell))
- shell_args = shell_arguments.append_to_argument(shell_args, '--url-mappings=',
- 'mojo:window_manager=%s' %
- script_args.window_manager)
-
if script_args.verbose:
print "Shell arguments: " + str(shell_args)
« no previous file with comments | « mojo/devtools/common/README.md ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698