| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "mojo/public/cpp/application/application.h" | 5 #ifndef MOJO_SERVICES_TEST_SERVICE_TEST_SERVICE_IMPL_H_ |
| 6 #define MOJO_SERVICES_TEST_SERVICE_TEST_SERVICE_IMPL_H_ |
| 7 |
| 6 #include "mojo/public/cpp/system/macros.h" | 8 #include "mojo/public/cpp/system/macros.h" |
| 7 #include "mojo/services/test_service/test_service.mojom.h" | 9 #include "mojo/services/test_service/test_service.mojom.h" |
| 8 | 10 |
| 9 namespace mojo { | 11 namespace mojo { |
| 10 namespace test { | 12 namespace test { |
| 11 | 13 |
| 14 class TestServiceApplication; |
| 15 |
| 12 class TestServiceImpl : public InterfaceImpl<ITestService> { | 16 class TestServiceImpl : public InterfaceImpl<ITestService> { |
| 13 public: | 17 public: |
| 14 TestServiceImpl(); | 18 explicit TestServiceImpl(TestServiceApplication* application); |
| 15 virtual ~TestServiceImpl(); | 19 virtual ~TestServiceImpl(); |
| 16 | 20 |
| 17 // |ITestService| methods: | 21 // |ITestService| methods: |
| 22 virtual void OnConnectionEstablished() MOJO_OVERRIDE; |
| 23 virtual void OnConnectionError() MOJO_OVERRIDE; |
| 18 virtual void Ping(const mojo::Callback<void()>& callback) MOJO_OVERRIDE; | 24 virtual void Ping(const mojo::Callback<void()>& callback) MOJO_OVERRIDE; |
| 19 | 25 |
| 20 private: | 26 private: |
| 27 TestServiceApplication* const application_; |
| 28 |
| 21 MOJO_DISALLOW_COPY_AND_ASSIGN(TestServiceImpl); | 29 MOJO_DISALLOW_COPY_AND_ASSIGN(TestServiceImpl); |
| 22 }; | 30 }; |
| 23 | 31 |
| 24 } // namespace test | 32 } // namespace test |
| 25 } // namespace mojo | 33 } // namespace mojo |
| 26 | 34 |
| 35 #endif // MOJO_SERVICES_TEST_SERVICE_TEST_SERVICE_IMPL_H_ |
| OLD | NEW |