| 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_UTILITY_UTILITY_SERVICE_FACTORY_H_ | 5 #ifndef CONTENT_UTILITY_UTILITY_SERVICE_FACTORY_H_ |
| 6 #define CONTENT_UTILITY_UTILITY_SERVICE_FACTORY_H_ | 6 #define CONTENT_UTILITY_UTILITY_SERVICE_FACTORY_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "content/child/service_factory.h" | 9 #include "content/child/service_factory.h" |
| 10 #include "services/service_manager/public/cpp/binder_registry.h" |
| 10 | 11 |
| 11 namespace content { | 12 namespace content { |
| 12 | 13 |
| 13 // Customization of ServiceFactory for the utility process. Exposed to the | 14 // Customization of ServiceFactory for the utility process. Exposed to the |
| 14 // browser via the utility process's InterfaceRegistry. | 15 // browser via the utility process's InterfaceRegistry. |
| 15 class UtilityServiceFactory : public ServiceFactory { | 16 class UtilityServiceFactory : public ServiceFactory { |
| 16 public: | 17 public: |
| 17 UtilityServiceFactory(); | 18 UtilityServiceFactory(); |
| 18 ~UtilityServiceFactory() override; | 19 ~UtilityServiceFactory() override; |
| 19 | 20 |
| 20 // ServiceFactory overrides: | 21 // ServiceFactory overrides: |
| 21 void RegisterServices(ServiceMap* services) override; | 22 void RegisterServices(ServiceMap* services) override; |
| 22 void OnServiceQuit() override; | 23 void OnServiceQuit() override; |
| 23 | 24 |
| 24 private: | 25 private: |
| 25 void OnLoadFailed() override; | 26 void OnLoadFailed() override; |
| 26 | 27 |
| 28 std::unique_ptr<service_manager::Service> CreateNetworkService(); |
| 29 |
| 30 // Allows embedders to register their interface implementations before the |
| 31 // network service is created. |
| 32 std::unique_ptr<service_manager::BinderRegistry> network_registry_; |
| 33 |
| 27 DISALLOW_COPY_AND_ASSIGN(UtilityServiceFactory); | 34 DISALLOW_COPY_AND_ASSIGN(UtilityServiceFactory); |
| 28 }; | 35 }; |
| 29 | 36 |
| 30 } // namespace content | 37 } // namespace content |
| 31 | 38 |
| 32 #endif // CONTENT_UTILITY_UTILITY_SERVICE_FACTORY_H_ | 39 #endif // CONTENT_UTILITY_UTILITY_SERVICE_FACTORY_H_ |
| OLD | NEW |