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

Unified Diff: mojo/examples/html_viewer/html_viewer.cc

Issue 372273004: Shutdown cleanup (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 years, 5 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
Index: mojo/examples/html_viewer/html_viewer.cc
diff --git a/mojo/examples/html_viewer/html_viewer.cc b/mojo/examples/html_viewer/html_viewer.cc
index 235d4ab28629656a58f65661eeb4d83f811c9f9a..7cdbb12b75355dad2db0420520bdbbc8446a809b 100644
--- a/mojo/examples/html_viewer/html_viewer.cc
+++ b/mojo/examples/html_viewer/html_viewer.cc
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include "base/message_loop/message_loop.h"
#include "mojo/examples/html_viewer/blink_platform_impl.h"
#include "mojo/examples/html_viewer/html_document_view.h"
#include "mojo/public/cpp/application/application_connection.h"
@@ -79,6 +80,10 @@ class HTMLViewer : public ApplicationDelegate,
document_view_->AttachToNode(root);
MaybeLoad();
}
+ virtual void OnViewManagerDisconnected(
+ view_manager::ViewManager* view_manager) OVERRIDE {
+ base::MessageLoop::current()->Quit();
+ }
void MaybeLoad() {
if (document_view_ && response_.get())

Powered by Google App Engine
This is Rietveld 408576698