提交 27769cca 编写于 作者: E Eric Seidel

Teach tools/skydb how to take a URL as a parameter.

Turns out our shut-down code in debugger.cc is never
called.  Need to talk to Ben to figure out how
to listen for the CloseWindow.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/658113004
上级 b1f8bcd1
......@@ -74,11 +74,13 @@ class SkyDebugger : public mojo::ApplicationDelegate,
virtual void OnViewManagerDisconnected(
mojo::ViewManager* view_manager) override {
CHECK(false); // FIXME: This is dead code, why?
view_manager_ = nullptr;
root_ = nullptr;
}
virtual void OnViewDestroyed(mojo::View* view) override {
CHECK(false); // FIXME: This is dead code, why?
view->RemoveObserver(this);
}
......
......@@ -43,12 +43,16 @@ class Prompt : public mojo::ApplicationDelegate {
// Overridden from mojo::ApplicationDelegate:
virtual void Initialize(mojo::ApplicationImpl* app) override {
app->ConnectToService("mojo:sky_viewer", &tracing_);
ScheduleWaitForInput();
if (app->args().size() > 1)
url_ = app->args()[1];
}
virtual bool ConfigureIncomingConnection(
mojo::ApplicationConnection* connection) override {
connection->ConnectToService(&debugger_);
if (!url_.empty())
Reload();
ScheduleWaitForInput();
return true;
}
......
......@@ -5,16 +5,27 @@
import os
import subprocess
import sys
build_directory = 'out'
config_directory = 'Debug'
mojo_shell = os.path.abspath(os.path.join(__file__, os.pardir, os.pardir,
os.pardir, build_directory, config_directory, 'mojo_shell'))
BUILD_DIRECTORY = 'out'
CONFIG_DIRECTORY = 'Debug'
MOJO_SHELL_PATH = os.path.abspath(os.path.join(__file__, os.pardir, os.pardir,
os.pardir, BUILD_DIRECTORY, CONFIG_DIRECTORY, 'mojo_shell'))
subprocess.call([
mojo_shell,
'--content-handlers=text/html,mojo://sky_viewer/',
'--url-mappings=mojo:window_manager=mojo:sky_debugger',
'mojo:window_manager',
])
def main(args):
shell_command = [
MOJO_SHELL_PATH,
'--v=1',
'--content-handlers=text/html,mojo://sky_viewer/',
'--url-mappings=mojo:window_manager=mojo:sky_debugger',
'mojo:window_manager',
]
if args:
prompt_args = '--args-for=mojo://sky_debugger_prompt/ %s' % args[0]
shell_command.append(prompt_args)
subprocess.check_call(shell_command)
if __name__ == '__main__':
main(sys.argv[1:])
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册