| 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_CHILD_SERVICE_FACTORY_H_ | 5 #ifndef CONTENT_CHILD_SERVICE_FACTORY_H_ |
| 6 #define CONTENT_CHILD_SERVICE_FACTORY_H_ | 6 #define CONTENT_CHILD_SERVICE_FACTORY_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <memory> | 9 #include <memory> |
| 10 | 10 |
| 11 #include "base/macros.h" | 11 #include "base/macros.h" |
| 12 #include "content/public/common/service_info.h" | 12 #include "content/public/common/service_info.h" |
| 13 #include "services/shell/public/interfaces/service.mojom.h" | 13 #include "services/service_manager/public/interfaces/service.mojom.h" |
| 14 #include "services/shell/public/interfaces/service_factory.mojom.h" | 14 #include "services/service_manager/public/interfaces/service_factory.mojom.h" |
| 15 | 15 |
| 16 namespace content { | 16 namespace content { |
| 17 | 17 |
| 18 class EmbeddedServiceRunner; | 18 class EmbeddedServiceRunner; |
| 19 | 19 |
| 20 // Base class for child-process specific implementations of | 20 // Base class for child-process specific implementations of |
| 21 // shell::mojom::ServiceFactory. | 21 // shell::mojom::ServiceFactory. |
| 22 class ServiceFactory : public shell::mojom::ServiceFactory { | 22 class ServiceFactory : public shell::mojom::ServiceFactory { |
| 23 public: | 23 public: |
| 24 using ServiceMap = std::map<std::string, ServiceInfo>; | 24 using ServiceMap = std::map<std::string, ServiceInfo>; |
| (...skipping 15 matching lines...) Expand all Loading... |
| 40 bool has_registered_services_ = false; | 40 bool has_registered_services_ = false; |
| 41 std::unordered_map<std::string, std::unique_ptr<EmbeddedServiceRunner>> | 41 std::unordered_map<std::string, std::unique_ptr<EmbeddedServiceRunner>> |
| 42 services_; | 42 services_; |
| 43 | 43 |
| 44 DISALLOW_COPY_AND_ASSIGN(ServiceFactory); | 44 DISALLOW_COPY_AND_ASSIGN(ServiceFactory); |
| 45 }; | 45 }; |
| 46 | 46 |
| 47 } // namespace content | 47 } // namespace content |
| 48 | 48 |
| 49 #endif // CONTENT_CHILD_SERVICE_FACTORY_H_ | 49 #endif // CONTENT_CHILD_SERVICE_FACTORY_H_ |
| OLD | NEW |