James Robinson | 646469d | 2014-10-03 15:33:28 -0700 | [diff] [blame] | 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 |
| 3 | // found in the LICENSE file. |
| 4 | |
| 5 | #ifndef MOJO_EXAMPLES_TEST_EXAMPLE_SERVICE_APPLICATION_H_ |
| 6 | #define MOJO_EXAMPLES_TEST_EXAMPLE_SERVICE_APPLICATION_H_ |
| 7 | |
Ben Goodger | 96d7285 | 2014-10-27 15:05:15 -0700 | [diff] [blame] | 8 | #include "examples/apptest/example_service_impl.h" |
James Robinson | 646469d | 2014-10-03 15:33:28 -0700 | [diff] [blame] | 9 | #include "mojo/public/cpp/application/application_delegate.h" |
Michael Wasserman | cb82b1f | 2014-11-17 15:28:04 -0800 | [diff] [blame] | 10 | #include "mojo/public/cpp/application/interface_factory.h" |
James Robinson | 646469d | 2014-10-03 15:33:28 -0700 | [diff] [blame] | 11 | #include "mojo/public/cpp/system/macros.h" |
| 12 | |
| 13 | namespace mojo { |
| 14 | |
| 15 | class ApplicationConnection; |
| 16 | |
Michael Wasserman | cb82b1f | 2014-11-17 15:28:04 -0800 | [diff] [blame] | 17 | class ExampleServiceApplication : public ApplicationDelegate, |
| 18 | public InterfaceFactory<ExampleService> { |
James Robinson | 646469d | 2014-10-03 15:33:28 -0700 | [diff] [blame] | 19 | public: |
| 20 | ExampleServiceApplication(); |
Michael Wasserman | cb82b1f | 2014-11-17 15:28:04 -0800 | [diff] [blame] | 21 | ~ExampleServiceApplication() override; |
James Robinson | 646469d | 2014-10-03 15:33:28 -0700 | [diff] [blame] | 22 | |
| 23 | private: |
| 24 | // ApplicationDelegate implementation. |
Michael Wasserman | cb82b1f | 2014-11-17 15:28:04 -0800 | [diff] [blame] | 25 | bool ConfigureIncomingConnection( |
James Robinson | 646469d | 2014-10-03 15:33:28 -0700 | [diff] [blame] | 26 | ApplicationConnection* connection) override; |
| 27 | |
Michael Wasserman | cb82b1f | 2014-11-17 15:28:04 -0800 | [diff] [blame] | 28 | // InterfaceFactory<ExampleService> implementation. |
| 29 | void Create(ApplicationConnection* connection, |
| 30 | InterfaceRequest<ExampleService> request) override; |
James Robinson | 646469d | 2014-10-03 15:33:28 -0700 | [diff] [blame] | 31 | |
| 32 | MOJO_DISALLOW_COPY_AND_ASSIGN(ExampleServiceApplication); |
| 33 | }; |
| 34 | |
| 35 | } // namespace mojo |
| 36 | |
| 37 | #endif // MOJO_EXAMPLES_TEST_EXAMPLE_SERVICE_APPLICATION_H_ |