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 MOJO_SERVICES_TEST_SERVICE_TEST_SERVICE_APPLICATION_H_ |
| 6 #define MOJO_SERVICES_TEST_SERVICE_TEST_SERVICE_APPLICATION_H_ |
| 7 |
5 #include "mojo/public/cpp/application/application.h" | 8 #include "mojo/public/cpp/application/application.h" |
6 #include "mojo/public/cpp/system/macros.h" | 9 #include "mojo/public/cpp/system/macros.h" |
7 #include "mojo/services/test_service/test_service_impl.h" | |
8 | 10 |
9 namespace mojo { | 11 namespace mojo { |
10 namespace test { | 12 namespace test { |
11 namespace { | |
12 | 13 |
13 class TestServiceApplication : public Application { | 14 class TestServiceApplication : public Application { |
14 public: | 15 public: |
15 TestServiceApplication() {} | 16 TestServiceApplication(); |
16 virtual ~TestServiceApplication() {} | 17 virtual ~TestServiceApplication(); |
17 | 18 |
18 virtual void Initialize() MOJO_OVERRIDE { | 19 virtual void Initialize() MOJO_OVERRIDE; |
19 AddService<TestServiceImpl>(); | 20 |
20 } | 21 void AddRef(); |
| 22 void ReleaseRef(); |
21 | 23 |
22 private: | 24 private: |
| 25 int ref_count_; |
| 26 |
23 MOJO_DISALLOW_COPY_AND_ASSIGN(TestServiceApplication); | 27 MOJO_DISALLOW_COPY_AND_ASSIGN(TestServiceApplication); |
24 }; | 28 }; |
25 | 29 |
26 } // namespace | |
27 } // namespace test | 30 } // namespace test |
| 31 } // namespace mojo |
28 | 32 |
29 // static | 33 #endif // MOJO_SERVICES_TEST_SERVICE_TEST_SERVICE_APPLICATION_H_ |
30 Application* Application::Create() { | |
31 return new mojo::test::TestServiceApplication(); | |
32 } | |
33 | |
34 } // namespace mojo | |
OLD | NEW |