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

Unified Diff: mojo/examples/sample_app/hello_world_client_impl.cc

Issue 72123002: Work in progress for end-to-end bindings (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Use SimpleThread instead of Thread to avoid creating a MessageLoop Created 7 years, 1 month 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
« no previous file with comments | « no previous file | mojo/examples/sample_app/sample_app.cc » ('j') | mojo/examples/sample_app/sample_app.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/examples/sample_app/hello_world_client_impl.cc
diff --git a/mojo/examples/sample_app/hello_world_client_impl.cc b/mojo/examples/sample_app/hello_world_client_impl.cc
index c1233fca331a65c3ea5930f3c99ec80d0c27e9d4..bda310efc684fadd9a9297897f3ce7ea02d63bb7 100644
--- a/mojo/examples/sample_app/hello_world_client_impl.cc
+++ b/mojo/examples/sample_app/hello_world_client_impl.cc
@@ -6,6 +6,8 @@
#include <stdio.h>
+#include "base/message_loop/message_loop.h"
+
namespace mojo {
namespace examples {
@@ -16,6 +18,8 @@ HelloWorldClientImpl::HelloWorldClientImpl(mojo::Handle pipe)
void HelloWorldClientImpl::DidReceiveGreeting(int32_t result) {
printf("DidReceiveGreeting from pipe: %d\n", result);
+ // Stop the current message loop.
+ base::MessageLoop::current()->QuitNow();
}
HelloWorldClientImpl::~HelloWorldClientImpl() {}
« no previous file with comments | « no previous file | mojo/examples/sample_app/sample_app.cc » ('j') | mojo/examples/sample_app/sample_app.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698