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_impl.h" | 10 #include "mojo/public/cpp/application/interface_factory.h" |
11 #include "mojo/public/cpp/system/macros.h" | 11 #include "mojo/public/cpp/system/macros.h" |
12 | 12 |
13 namespace mojo { | 13 namespace mojo { |
14 | 14 |
15 class ApplicationConnection; | 15 class ApplicationConnection; |
16 | 16 |
17 class ExampleServiceApplication : public ApplicationDelegate { | 17 class ExampleServiceApplication : public ApplicationDelegate, |
18 public InterfaceFactory<ExampleService> { | |
18 public: | 19 public: |
19 ExampleServiceApplication(); | 20 ExampleServiceApplication(); |
20 virtual ~ExampleServiceApplication(); | 21 ~ExampleServiceApplication() override; |
21 | 22 |
22 private: | 23 private: |
23 // ApplicationDelegate implementation. | 24 // ApplicationDelegate implementation. |
24 virtual bool ConfigureIncomingConnection( | 25 bool ConfigureIncomingConnection( |
25 ApplicationConnection* connection) override; | 26 ApplicationConnection* connection) override; |
26 | 27 |
27 InterfaceFactoryImpl<ExampleServiceImpl> example_service_factory_; | 28 // InterfaceFactory<ExampleService> implementation. |
msw
2014/11/17 21:42:36
Question: Do we want an InterfaceFactory implement
jamesr
2014/11/17 22:33:04
Maybe. I think the way to evaluate whether helpers
msw
2014/11/17 23:05:32
Acknowledged, I'll hold off on this.
| |
29 void Create(ApplicationConnection* connection, | |
30 InterfaceRequest<ExampleService> request) override; | |
28 | 31 |
29 MOJO_DISALLOW_COPY_AND_ASSIGN(ExampleServiceApplication); | 32 MOJO_DISALLOW_COPY_AND_ASSIGN(ExampleServiceApplication); |
30 }; | 33 }; |
31 | 34 |
32 } // namespace mojo | 35 } // namespace mojo |
33 | 36 |
34 #endif // MOJO_EXAMPLES_TEST_EXAMPLE_SERVICE_APPLICATION_H_ | 37 #endif // MOJO_EXAMPLES_TEST_EXAMPLE_SERVICE_APPLICATION_H_ |
OLD | NEW |