| 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_BACKGROUND_BACKGROUND_SERVICE_MANAGER_H_ | 5 #ifndef SERVICES_SERVICE_MANAGER_BACKGROUND_BACKGROUND_SERVICE_MANAGER_H_ |
| 6 #define SERVICES_SERVICE_MANAGER_BACKGROUND_BACKGROUND_SERVICE_MANAGER_H_ | 6 #define SERVICES_SERVICE_MANAGER_BACKGROUND_BACKGROUND_SERVICE_MANAGER_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 #include "base/macros.h" | 11 #include "base/macros.h" |
| 12 #include "mojo/public/cpp/bindings/interface_request.h" | 12 #include "mojo/public/cpp/bindings/interface_request.h" |
| 13 #include "services/catalog/store.h" | 13 #include "services/catalog/store.h" |
| 14 #include "services/service_manager/public/interfaces/service.mojom.h" | 14 #include "services/service_manager/public/interfaces/service.mojom.h" |
| 15 #include "services/service_manager/runner/host/service_process_launcher.h" | 15 #include "services/service_manager/runner/host/service_process_launcher.h" |
| 16 | 16 |
| 17 namespace catalog { | |
| 18 class Store; | |
| 19 } | |
| 20 | |
| 21 namespace service_manager { | 17 namespace service_manager { |
| 22 | 18 |
| 23 class ServiceManager; | 19 class ServiceManager; |
| 24 | 20 |
| 25 // BackgroundServiceManager starts up a Service Manager on a background thread, | 21 // BackgroundServiceManager starts up a Service Manager on a background thread, |
| 26 // and | 22 // and |
| 27 // destroys the thread in the destructor. Once created use CreateApplication() | 23 // destroys the thread in the destructor. Once created use CreateApplication() |
| 28 // to obtain an InterfaceRequest for the Application. The InterfaceRequest can | 24 // to obtain an InterfaceRequest for the Application. The InterfaceRequest can |
| 29 // then be bound to an ApplicationImpl. | 25 // then be bound to an ApplicationImpl. |
| 30 class BackgroundServiceManager { | 26 class BackgroundServiceManager { |
| 31 public: | 27 public: |
| 32 struct InitParams { | 28 struct InitParams { |
| 33 InitParams(); | 29 InitParams(); |
| 34 ~InitParams(); | 30 ~InitParams(); |
| 35 | 31 |
| 36 ServiceProcessLauncher::Delegate* | 32 ServiceProcessLauncher::Delegate* |
| 37 service_process_launcher_delegate = nullptr; | 33 service_process_launcher_delegate = nullptr; |
| 38 std::unique_ptr<catalog::Store> catalog_store; | 34 |
| 39 // If true the edk is initialized. | 35 // If true the edk is initialized. |
| 40 bool init_edk = true; | 36 bool init_edk = true; |
| 41 }; | 37 }; |
| 42 | 38 |
| 43 BackgroundServiceManager(); | 39 BackgroundServiceManager(); |
| 44 ~BackgroundServiceManager(); | 40 ~BackgroundServiceManager(); |
| 45 | 41 |
| 46 // Starts the background service manager. |command_line_switches| are | 42 // Starts the background service manager. |command_line_switches| are |
| 47 // additional | 43 // additional |
| 48 // switches applied to any processes spawned by this call. | 44 // switches applied to any processes spawned by this call. |
| (...skipping 13 matching lines...) Expand all Loading... |
| 62 class MojoThread; | 58 class MojoThread; |
| 63 | 59 |
| 64 std::unique_ptr<MojoThread> thread_; | 60 std::unique_ptr<MojoThread> thread_; |
| 65 | 61 |
| 66 DISALLOW_COPY_AND_ASSIGN(BackgroundServiceManager); | 62 DISALLOW_COPY_AND_ASSIGN(BackgroundServiceManager); |
| 67 }; | 63 }; |
| 68 | 64 |
| 69 } // namespace service_manager | 65 } // namespace service_manager |
| 70 | 66 |
| 71 #endif // SERVICES_SERVICE_MANAGER_BACKGROUND_BACKGROUND_SERVICE_MANAGER_H_ | 67 #endif // SERVICES_SERVICE_MANAGER_BACKGROUND_BACKGROUND_SERVICE_MANAGER_H_ |
| OLD | NEW |