提交 c8e5e208 编写于 作者: C Colin Blundell

Add ApplicationDelegate::Quit()

This CL adds ApplicationDelegate::Quit(), which ApplicationImpl calls
before shutting down the main run loop. In this function, an
ApplicationDelegate should shut down anything that relies on the main
run loop being active.

R=eseidel@chromium.org, jamesr@chromium.org

Review URL: https://codereview.chromium.org/947253003
上级 26460f81
......@@ -67,7 +67,7 @@ class SkyDebugger : public mojo::ApplicationDelegate,
if (request->relative_url == "/reload") {
Load(callback, url_);
} else if (request->relative_url == "/quit") {
Quit();
Exit();
} else if (request->relative_url == "/load") {
std::string url;
mojo::common::BlockingCopyToString(request->body.Pass(), &url);
......@@ -118,7 +118,7 @@ class SkyDebugger : public mojo::ApplicationDelegate,
window_manager_->Embed(url_, nullptr, nullptr);
}
void Quit() {
void Exit() {
// TODO(eseidel): We should orderly shutdown once mojo can.
exit(0);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册