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

Unified Diff: examples/apptest/example_service_impl.h

Issue 731293003: Use Binding instead of InterfaceImpl for ExampleService. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Sync and rebase. 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
« no previous file with comments | « examples/apptest/example_service_application.cc ('k') | examples/apptest/example_service_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: examples/apptest/example_service_impl.h
diff --git a/examples/apptest/example_service_impl.h b/examples/apptest/example_service_impl.h
index 7c6138a0190aabe16b70d0e7441222e6ec1269bf..385c5d59d7a1b0fb67909b407c2a7a1ab560287a 100644
--- a/examples/apptest/example_service_impl.h
+++ b/examples/apptest/example_service_impl.h
@@ -6,21 +6,25 @@
#define MOJO_EXAMPLES_TEST_EXAMPLE_SERVICE_IMPL_H_
#include "examples/apptest/example_service.mojom.h"
+#include "mojo/public/cpp/bindings/strong_binding.h"
#include "mojo/public/cpp/system/macros.h"
namespace mojo {
class ApplicationConnection;
-class ExampleServiceImpl : public InterfaceImpl<ExampleService> {
+class ExampleServiceImpl : public ExampleService {
public:
- ExampleServiceImpl();
- virtual ~ExampleServiceImpl();
+ explicit ExampleServiceImpl(InterfaceRequest<ExampleService> request);
+ ~ExampleServiceImpl() override;
private:
- // InterfaceImpl<ExampleService> overrides.
- virtual void Ping(uint16_t ping_value) override;
- virtual void RunCallback(const Callback<void()>& callback) override;
+ // ExampleService overrides.
+ void Ping(uint16_t ping_value) override;
+ void RunCallback(const Callback<void()>& callback) override;
+
+ // ExampleServiceImpl is strongly bound to the pipe.
+ StrongBinding<ExampleService> binding_;
MOJO_DISALLOW_COPY_AND_ASSIGN(ExampleServiceImpl);
};
« no previous file with comments | « examples/apptest/example_service_application.cc ('k') | examples/apptest/example_service_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698