| 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 #ifndef SERVICES_TEST_SERVICE_TEST_SERVICE_APPLICATION_H_ | 5 #ifndef SERVICES_TEST_SERVICE_TEST_SERVICE_APPLICATION_H_ |
| 6 #define SERVICES_TEST_SERVICE_TEST_SERVICE_APPLICATION_H_ | 6 #define SERVICES_TEST_SERVICE_TEST_SERVICE_APPLICATION_H_ |
| 7 | 7 |
| 8 #include "mojo/public/cpp/application/application_delegate.h" | 8 #include "mojo/public/cpp/application/application_impl_base.h" |
| 9 #include "mojo/public/cpp/system/macros.h" | 9 #include "mojo/public/cpp/system/macros.h" |
| 10 | 10 |
| 11 namespace mojo { | 11 namespace mojo { |
| 12 namespace test { | 12 namespace test { |
| 13 | 13 |
| 14 class TestService; | 14 class TestServiceApplication : public ApplicationImplBase { |
| 15 class TestTimeService; | |
| 16 | |
| 17 class TestServiceApplication : public ApplicationDelegate { | |
| 18 public: | 15 public: |
| 19 TestServiceApplication(); | 16 TestServiceApplication(); |
| 20 ~TestServiceApplication() override; | 17 ~TestServiceApplication() override; |
| 21 | 18 |
| 22 void Initialize(ApplicationImpl* app) override; | 19 // |ApplicationImplBase| method: |
| 23 | 20 bool OnAcceptConnection(ServiceProviderImpl* service_provider_impl) override; |
| 24 // ApplicationDelegate implementation. | |
| 25 bool ConfigureIncomingConnection( | |
| 26 ServiceProviderImpl* service_provider_impl) override; | |
| 27 | 21 |
| 28 void AddRef(); | 22 void AddRef(); |
| 29 void ReleaseRef(); | 23 void ReleaseRef(); |
| 30 | 24 |
| 31 private: | 25 private: |
| 32 int ref_count_; | 26 int ref_count_; |
| 33 ApplicationImpl* app_impl_; | |
| 34 | 27 |
| 35 MOJO_DISALLOW_COPY_AND_ASSIGN(TestServiceApplication); | 28 MOJO_DISALLOW_COPY_AND_ASSIGN(TestServiceApplication); |
| 36 }; | 29 }; |
| 37 | 30 |
| 38 } // namespace test | 31 } // namespace test |
| 39 } // namespace mojo | 32 } // namespace mojo |
| 40 | 33 |
| 41 #endif // SERVICES_TEST_SERVICE_TEST_SERVICE_APPLICATION_H_ | 34 #endif // SERVICES_TEST_SERVICE_TEST_SERVICE_APPLICATION_H_ |
| OLD | NEW |