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

Unified Diff: mojo/examples/hello_world_service/hello_world_service_impl.cc

Issue 72123002: Work in progress for end-to-end bindings (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add MessageLoop instance to SampleApp and run it 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
Index: mojo/examples/hello_world_service/hello_world_service_impl.cc
diff --git a/mojo/examples/hello_world_service/hello_world_service_impl.cc b/mojo/examples/hello_world_service/hello_world_service_impl.cc
new file mode 100644
index 0000000000000000000000000000000000000000..d1060cb126a4d755a96d1168724afbe3e4f29932
--- /dev/null
+++ b/mojo/examples/hello_world_service/hello_world_service_impl.cc
@@ -0,0 +1,26 @@
+// Copyright 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "mojo/examples/hello_world_service/hello_world_service_impl.h"
+
+#include <string>
+#include "base/logging.h"
+
+namespace mojo {
+namespace examples {
+
+HelloWorldServiceImpl::HelloWorldServiceImpl(mojo::Handle pipe)
+ : client_(pipe) {
+ client_.SetPeer(this);
+}
+
+void HelloWorldServiceImpl::Greeting(const mojo::String* greeting) {
+ LOG(INFO) << greeting->To<std::string>();
+ client_->DidReceiveGreeting(42);
+}
+
+HelloWorldServiceImpl::~HelloWorldServiceImpl() {}
+
+} // examples
+} // mojo

Powered by Google App Engine
This is Rietveld 408576698