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_IMPL_H_ | 5 #ifndef MOJO_EXAMPLES_TEST_EXAMPLE_SERVICE_IMPL_H_ |
6 #define MOJO_EXAMPLES_TEST_EXAMPLE_SERVICE_IMPL_H_ | 6 #define MOJO_EXAMPLES_TEST_EXAMPLE_SERVICE_IMPL_H_ |
7 | 7 |
8 #include "examples/apptest/example_service.mojom.h" | 8 #include "examples/apptest/example_service.mojom.h" |
9 #include "mojo/public/cpp/bindings/strong_binding.h" | 9 #include "mojo/public/cpp/bindings/strong_binding.h" |
10 #include "mojo/public/cpp/system/macros.h" | 10 #include "mojo/public/cpp/system/macros.h" |
11 | 11 |
12 namespace mojo { | 12 namespace mojo { |
13 | 13 |
14 class ApplicationConnection; | |
15 | |
16 class ExampleServiceImpl : public ExampleService { | 14 class ExampleServiceImpl : public ExampleService { |
17 public: | 15 public: |
18 explicit ExampleServiceImpl(InterfaceRequest<ExampleService> request); | 16 explicit ExampleServiceImpl(InterfaceRequest<ExampleService> request); |
19 ~ExampleServiceImpl() override; | 17 ~ExampleServiceImpl() override; |
20 | 18 |
21 private: | 19 private: |
22 // ExampleService overrides. | 20 // ExampleService overrides. |
23 void Ping(uint16_t ping_value, | 21 void Ping(uint16_t ping_value, |
24 const ExampleService::PingCallback& callback) override; | 22 const ExampleService::PingCallback& callback) override; |
25 | 23 |
26 // ExampleServiceImpl is strongly bound to the pipe. | 24 // ExampleServiceImpl is strongly bound to the pipe. |
27 StrongBinding<ExampleService> binding_; | 25 StrongBinding<ExampleService> binding_; |
28 | 26 |
29 MOJO_DISALLOW_COPY_AND_ASSIGN(ExampleServiceImpl); | 27 MOJO_DISALLOW_COPY_AND_ASSIGN(ExampleServiceImpl); |
30 }; | 28 }; |
31 | 29 |
32 } // namespace mojo | 30 } // namespace mojo |
33 | 31 |
34 #endif // MOJO_EXAMPLES_TEST_EXAMPLE_SERVICE_IMPL_H_ | 32 #endif // MOJO_EXAMPLES_TEST_EXAMPLE_SERVICE_IMPL_H_ |
OLD | NEW |