OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 SERVICES_SERVICE_MANAGER_PUBLIC_CPP_SERVICE_TEST_H_ | 5 #ifndef SERVICES_SERVICE_MANAGER_PUBLIC_CPP_SERVICE_TEST_H_ |
6 #define SERVICES_SERVICE_MANAGER_PUBLIC_CPP_SERVICE_TEST_H_ | 6 #define SERVICES_SERVICE_MANAGER_PUBLIC_CPP_SERVICE_TEST_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 25 matching lines...) Expand all Loading... |
36 // to customize this should subclass this class instead of Service, | 36 // to customize this should subclass this class instead of Service, |
37 // otherwise they will have to call ServiceTest::OnStartCalled() to forward | 37 // otherwise they will have to call ServiceTest::OnStartCalled() to forward |
38 // metadata from OnStart() to the test. | 38 // metadata from OnStart() to the test. |
39 class ServiceTestClient : public Service { | 39 class ServiceTestClient : public Service { |
40 public: | 40 public: |
41 explicit ServiceTestClient(ServiceTest* test); | 41 explicit ServiceTestClient(ServiceTest* test); |
42 ~ServiceTestClient() override; | 42 ~ServiceTestClient() override; |
43 | 43 |
44 protected: | 44 protected: |
45 void OnStart() override; | 45 void OnStart() override; |
46 void OnBindInterface(const ServiceInfo& source_info, | 46 void OnBindInterface(const BindSourceInfo& source_info, |
47 const std::string& interface_name, | 47 const std::string& interface_name, |
48 mojo::ScopedMessagePipeHandle interface_pipe) override; | 48 mojo::ScopedMessagePipeHandle interface_pipe) override; |
49 | 49 |
50 private: | 50 private: |
51 ServiceTest* test_; | 51 ServiceTest* test_; |
52 | 52 |
53 DISALLOW_COPY_AND_ASSIGN(ServiceTestClient); | 53 DISALLOW_COPY_AND_ASSIGN(ServiceTestClient); |
54 }; | 54 }; |
55 | 55 |
56 class ServiceTest : public testing::Test { | 56 class ServiceTest : public testing::Test { |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
111 | 111 |
112 base::Closure initialize_called_; | 112 base::Closure initialize_called_; |
113 | 113 |
114 DISALLOW_COPY_AND_ASSIGN(ServiceTest); | 114 DISALLOW_COPY_AND_ASSIGN(ServiceTest); |
115 }; | 115 }; |
116 | 116 |
117 } // namespace test | 117 } // namespace test |
118 } // namespace service_manager | 118 } // namespace service_manager |
119 | 119 |
120 #endif // SERVICES_SERVICE_MANAGER_PUBLIC_CPP_SERVICE_TEST_H_ | 120 #endif // SERVICES_SERVICE_MANAGER_PUBLIC_CPP_SERVICE_TEST_H_ |
OLD | NEW |