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

Unified Diff: services/test_service/test_service_impl.h

Issue 924543003: Avoid InterfaceImpl in //services/test_service (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 10 months 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 | « services/test_service/test_service_application.cc ('k') | services/test_service/test_service_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/test_service/test_service_impl.h
diff --git a/services/test_service/test_service_impl.h b/services/test_service/test_service_impl.h
index 18b7c8451dad0f9a49cc65673909604f114d7e99..e37b675b7ce12e3c9e6daecaf2e5decce7f93029 100644
--- a/services/test_service/test_service_impl.h
+++ b/services/test_service/test_service_impl.h
@@ -6,6 +6,7 @@
#define SERVICES_TEST_SERVICE_TEST_SERVICE_IMPL_H_
#include "base/memory/scoped_ptr.h"
+#include "mojo/public/cpp/bindings/strong_binding.h"
#include "mojo/public/cpp/system/macros.h"
#include "services/test_service/test_service.mojom.h"
@@ -16,25 +17,29 @@ namespace test {
class TrackedService;
class TestServiceApplication;
-class TestServiceImpl : public InterfaceImpl<TestService> {
+class TestServiceImpl : public TestService, ErrorHandler {
public:
TestServiceImpl(ApplicationImpl* app_impl,
- TestServiceApplication* application);
+ TestServiceApplication* application,
+ InterfaceRequest<TestService> request);
~TestServiceImpl() override;
// |TestService| methods:
- void OnConnectionError() override;
void Ping(const mojo::Callback<void()>& callback) override;
void ConnectToAppAndGetTime(
const mojo::String& app_url,
const mojo::Callback<void(int64_t)>& callback) override;
void StartTrackingRequests(const mojo::Callback<void()>& callback) override;
+ // ErrorHandler methods:
+ void OnConnectionError() override;
+
private:
TestServiceApplication* const application_;
ApplicationImpl* const app_impl_;
TestTimeServicePtr time_service_;
scoped_ptr<TrackedService> tracking_;
+ StrongBinding<TestService> binding_;
MOJO_DISALLOW_COPY_AND_ASSIGN(TestServiceImpl);
};
« no previous file with comments | « services/test_service/test_service_application.cc ('k') | services/test_service/test_service_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698