| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 CONTENT_PUBLIC_TEST_TEST_SERVICE_H_ | 5 #ifndef CONTENT_PUBLIC_TEST_TEST_SERVICE_H_ |
| 6 #define CONTENT_PUBLIC_TEST_TEST_SERVICE_H_ | 6 #define CONTENT_PUBLIC_TEST_TEST_SERVICE_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 class TestService | 23 class TestService |
| 24 : public service_manager::Service, | 24 : public service_manager::Service, |
| 25 public service_manager::InterfaceFactory<mojom::TestService>, | 25 public service_manager::InterfaceFactory<mojom::TestService>, |
| 26 public mojom::TestService { | 26 public mojom::TestService { |
| 27 public: | 27 public: |
| 28 TestService(); | 28 TestService(); |
| 29 ~TestService() override; | 29 ~TestService() override; |
| 30 | 30 |
| 31 private: | 31 private: |
| 32 // service_manager::Service: | 32 // service_manager::Service: |
| 33 void OnBindInterface(const service_manager::ServiceInfo& source_info, | 33 void OnBindInterface(const service_manager::BindSourceInfo& source_info, |
| 34 const std::string& interface_name, | 34 const std::string& interface_name, |
| 35 mojo::ScopedMessagePipeHandle interface_pipe) override; | 35 mojo::ScopedMessagePipeHandle interface_pipe) override; |
| 36 | 36 |
| 37 // service_manager::InterfaceFactory<mojom::TestService>: | 37 // service_manager::InterfaceFactory<mojom::TestService>: |
| 38 void Create(const service_manager::Identity& remote_identity, | 38 void Create(const service_manager::Identity& remote_identity, |
| 39 mojom::TestServiceRequest request) override; | 39 mojom::TestServiceRequest request) override; |
| 40 | 40 |
| 41 // TestService: | 41 // TestService: |
| 42 void DoSomething(const DoSomethingCallback& callback) override; | 42 void DoSomething(const DoSomethingCallback& callback) override; |
| 43 void DoTerminateProcess(const DoTerminateProcessCallback& callback) override; | 43 void DoTerminateProcess(const DoTerminateProcessCallback& callback) override; |
| 44 void CreateFolder(const CreateFolderCallback& callback) override; | 44 void CreateFolder(const CreateFolderCallback& callback) override; |
| 45 void GetRequestorName(const GetRequestorNameCallback& callback) override; | 45 void GetRequestorName(const GetRequestorNameCallback& callback) override; |
| 46 void CreateSharedBuffer(const std::string& message, | 46 void CreateSharedBuffer(const std::string& message, |
| 47 const CreateSharedBufferCallback& callback) override; | 47 const CreateSharedBufferCallback& callback) override; |
| 48 | 48 |
| 49 service_manager::BinderRegistry registry_; | 49 service_manager::BinderRegistry registry_; |
| 50 mojo::Binding<mojom::TestService> service_binding_; | 50 mojo::Binding<mojom::TestService> service_binding_; |
| 51 | 51 |
| 52 // The name of the app connecting to us. | 52 // The name of the app connecting to us. |
| 53 std::string requestor_name_; | 53 std::string requestor_name_; |
| 54 | 54 |
| 55 DISALLOW_COPY_AND_ASSIGN(TestService); | 55 DISALLOW_COPY_AND_ASSIGN(TestService); |
| 56 }; | 56 }; |
| 57 | 57 |
| 58 } // namespace content | 58 } // namespace content |
| 59 | 59 |
| 60 #endif // CONTENT_PUBLIC_TEST_TEST_SERVICE_H_ | 60 #endif // CONTENT_PUBLIC_TEST_TEST_SERVICE_H_ |
| OLD | NEW |