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_) |