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

Unified Diff: mojo/examples/png_viewer/png_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/png_viewer/png_viewer.cc
diff --git a/mojo/examples/png_viewer/png_viewer.cc b/mojo/examples/png_viewer/png_viewer.cc
index 62dcd2bc8f8b273bda61e8147bf90e313849d24a..ab2f70011ddf560e9d62ce05fda89f1f9314fa07 100644
--- a/mojo/examples/png_viewer/png_viewer.cc
+++ b/mojo/examples/png_viewer/png_viewer.cc
@@ -4,6 +4,7 @@
#include <algorithm>
+#include "base/message_loop/message_loop.h"
#include "base/strings/string_tokenizer.h"
#include "mojo/examples/media_viewer/media_viewer.mojom.h"
#include "mojo/public/cpp/application/application_connection.h"
@@ -166,6 +167,10 @@ class PNGViewer : public ApplicationDelegate,
if (!bitmap_.isNull())
DrawBitmap();
}
+ virtual void OnViewManagerDisconnected(
+ view_manager::ViewManager* view_manager) OVERRIDE {
+ base::MessageLoop::current()->Quit();
+ }
void DrawBitmap() {
if (!content_view_)

Powered by Google App Engine
This is Rietveld 408576698