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_EXAMPLES_TEST_EXAMPLE_SERVICE_APPLICATION_H_ | 5 #ifndef MOJO_EXAMPLES_TEST_EXAMPLE_SERVICE_APPLICATION_H_ |
6 #define MOJO_EXAMPLES_TEST_EXAMPLE_SERVICE_APPLICATION_H_ | 6 #define MOJO_EXAMPLES_TEST_EXAMPLE_SERVICE_APPLICATION_H_ |
7 | 7 |
8 #include "examples/apptest/example_service_impl.h" | 8 #include "examples/apptest/example_service_impl.h" |
9 #include "mojo/public/cpp/application/application_delegate.h" | 9 #include "mojo/public/cpp/application/application_delegate.h" |
10 #include "mojo/public/cpp/application/interface_factory.h" | |
11 #include "mojo/public/cpp/system/macros.h" | 10 #include "mojo/public/cpp/system/macros.h" |
12 | 11 |
13 namespace mojo { | 12 namespace mojo { |
14 | 13 |
15 class ApplicationConnection; | 14 class ApplicationConnection; |
16 | 15 |
17 class ExampleServiceApplication : public ApplicationDelegate, | 16 class ExampleServiceApplication : public ApplicationDelegate { |
18 public InterfaceFactory<ExampleService> { | |
19 public: | 17 public: |
20 ExampleServiceApplication(); | 18 ExampleServiceApplication(); |
21 ~ExampleServiceApplication() override; | 19 ~ExampleServiceApplication() override; |
22 | 20 |
23 private: | 21 private: |
24 // ApplicationDelegate implementation. | 22 // ApplicationDelegate implementation. |
25 bool ConfigureIncomingConnection( | 23 bool ConfigureIncomingConnection( |
26 ApplicationConnection* connection) override; | 24 ApplicationConnection* connection) override; |
27 | 25 |
28 // InterfaceFactory<ExampleService> implementation. | |
29 void Create(const ConnectionContext& connection_context, | |
30 InterfaceRequest<ExampleService> request) override; | |
31 | |
32 MOJO_DISALLOW_COPY_AND_ASSIGN(ExampleServiceApplication); | 26 MOJO_DISALLOW_COPY_AND_ASSIGN(ExampleServiceApplication); |
33 }; | 27 }; |
34 | 28 |
35 } // namespace mojo | 29 } // namespace mojo |
36 | 30 |
37 #endif // MOJO_EXAMPLES_TEST_EXAMPLE_SERVICE_APPLICATION_H_ | 31 #endif // MOJO_EXAMPLES_TEST_EXAMPLE_SERVICE_APPLICATION_H_ |
OLD | NEW |