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

Unified Diff: examples/apptest/example_service_impl.cc

Issue 731293003: Use Binding instead of InterfaceImpl for ExampleService. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Simplify ExampleClientImpl. Created 6 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: examples/apptest/example_service_impl.cc
diff --git a/examples/apptest/example_service_impl.cc b/examples/apptest/example_service_impl.cc
index 6eae1ade4cd742f5cff04f19cbc2f010c900cc13..ca895e27cf74ac553ad209ca360e8410fe952bfc 100644
--- a/examples/apptest/example_service_impl.cc
+++ b/examples/apptest/example_service_impl.cc
@@ -4,16 +4,16 @@
#include "examples/apptest/example_service_impl.h"
-#include "mojo/public/cpp/utility/run_loop.h"
-
namespace mojo {
-ExampleServiceImpl::ExampleServiceImpl() {}
+ExampleServiceImpl::ExampleServiceImpl(
+ mojo::InterfaceRequest<ExampleService> request)
jamesr 2014/11/17 22:33:04 no ::mojo
msw 2014/11/17 23:05:32 Done.
+ : binding_(this, request.Pass()) {}
ExampleServiceImpl::~ExampleServiceImpl() {}
void ExampleServiceImpl::Ping(uint16_t ping_value) {
- client()->Pong(ping_value);
+ binding_.client()->Pong(ping_value);
}
void ExampleServiceImpl::RunCallback(const Callback<void()>& callback) {
« examples/apptest/example_service_impl.h ('K') | « examples/apptest/example_service_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698