Index: mojo/services/html_viewer/view_url.py |
diff --git a/media/mojo/scripts/run_mojo_media_renderer.py b/mojo/services/html_viewer/view_url.py |
similarity index 51% |
copy from media/mojo/scripts/run_mojo_media_renderer.py |
copy to mojo/services/html_viewer/view_url.py |
index 6ca34dc9dbdb6a59a3ff64d555e23f648825c46c..a543385e5aea4c59531f350d30699165e9de9f68 100755 |
--- a/media/mojo/scripts/run_mojo_media_renderer.py |
+++ b/mojo/services/html_viewer/view_url.py |
@@ -2,12 +2,6 @@ |
# Copyright 2015 The Chromium Authors. All rights reserved. |
# Use of this source code is governed by a BSD-style license that can be |
# found in the LICENSE file. |
-# |
-# The script follows mojo/services/html_viewer/view_url.py and modified it for |
-# test the mojo media renderer. The page will be rendered in a headless mode. |
-# |
-# TODO(xhwang): Explore the possibility of running this with the Kiosk window |
-# manager. See http://crbug.com/467176 |
import argparse |
import os |
@@ -30,44 +24,29 @@ def _BuildShellCommand(args): |
shell_command = [os.path.join(build_dir, "mojo_shell")] |
options = [] |
- |
options.append( |
"--origin=https://storage.googleapis.com/mojo/services/linux-x64/%s" % |
sdk_version) |
- options.append("--url-mappings=mojo:html_viewer=file://%s/html_viewer.mojo," |
- "mojo:media=file://%s/media.mojo" % (build_dir, build_dir)) |
- |
- args_for_html_viewer = "--enable-mojo-media-renderer --is-headless " |
- if args.verbose: |
- args_for_html_viewer += \ |
- "--vmodule=pipeline*=3,*renderer_impl*=3,*mojo_demuxer*=3" |
- options.append("--args-for=mojo:html_viewer %s" % args_for_html_viewer) |
- |
- if args.verbose: |
- args_for_media = "--vmodule=mojo*service=3" |
- options.append("--args-for=mojo:media %s" % args_for_media) |
- |
- full_command = shell_command + options + [args.url] |
+ options.append("--url-mappings=mojo:html_viewer=file://%s/html_viewer.mojo" % |
+ build_dir) |
+ options.append('--args-for=mojo:kiosk_wm %s' % args.url) |
- if args.verbose: |
- print full_command |
+ app_to_run = "mojo:kiosk_wm" |
- return full_command |
+ return shell_command + options + [app_to_run] |
def main(): |
parser = argparse.ArgumentParser( |
- description="View a URL with HTMLViewer with mojo media renderer. " |
- "You must have built //mojo/services/html_viewer, " |
- "//mojo/services/network and //media/mojo/services first. " |
- " Note that this will currently often fail spectacularly due " |
- " to lack of binary stability in Mojo.") |
+ description="View a URL with HTMLViewer in the Kiosk window manager. " |
+ "You must have built //mojo/services/html_viewer and " |
+ "//mojo/services/network first. Note that this will " |
+ "currently often fail spectacularly due to lack of binary " |
+ "stability in Mojo.") |
parser.add_argument( |
"--build-dir", |
help="Path to the dir containing the linux-x64 binaries relative to the " |
"repo root (default: %(default)s)", |
default="out/Release") |
- parser.add_argument("--verbose", help="Increase output verbosity.", |
- action="store_true") |
parser.add_argument("url", |
help="The URL to be viewed") |