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 | 16 |
16 namespace catalog { | 17 namespace catalog { |
17 class Store; | 18 class Store; |
18 } | 19 } |
19 | 20 |
20 namespace service_manager { | 21 namespace service_manager { |
21 | 22 |
22 class NativeRunnerDelegate; | |
23 class ServiceManager; | 23 class ServiceManager; |
24 | 24 |
25 // BackgroundServiceManager starts up a Service Manager on a background thread, | 25 // BackgroundServiceManager starts up a Service Manager on a background thread, |
26 // and | 26 // and |
27 // destroys the thread in the destructor. Once created use CreateApplication() | 27 // destroys the thread in the destructor. Once created use CreateApplication() |
28 // to obtain an InterfaceRequest for the Application. The InterfaceRequest can | 28 // to obtain an InterfaceRequest for the Application. The InterfaceRequest can |
29 // then be bound to an ApplicationImpl. | 29 // then be bound to an ApplicationImpl. |
30 class BackgroundServiceManager { | 30 class BackgroundServiceManager { |
31 public: | 31 public: |
32 struct InitParams { | 32 struct InitParams { |
33 InitParams(); | 33 InitParams(); |
34 ~InitParams(); | 34 ~InitParams(); |
35 | 35 |
36 NativeRunnerDelegate* native_runner_delegate = nullptr; | 36 ServiceProcessLauncher::Delegate* |
| 37 service_process_launcher_delegate = nullptr; |
37 std::unique_ptr<catalog::Store> catalog_store; | 38 std::unique_ptr<catalog::Store> catalog_store; |
38 // If true the edk is initialized. | 39 // If true the edk is initialized. |
39 bool init_edk = true; | 40 bool init_edk = true; |
40 }; | 41 }; |
41 | 42 |
42 BackgroundServiceManager(); | 43 BackgroundServiceManager(); |
43 ~BackgroundServiceManager(); | 44 ~BackgroundServiceManager(); |
44 | 45 |
45 // Starts the background service manager. |command_line_switches| are | 46 // Starts the background service manager. |command_line_switches| are |
46 // additional | 47 // additional |
(...skipping 14 matching lines...) Expand all Loading... |
61 class MojoThread; | 62 class MojoThread; |
62 | 63 |
63 std::unique_ptr<MojoThread> thread_; | 64 std::unique_ptr<MojoThread> thread_; |
64 | 65 |
65 DISALLOW_COPY_AND_ASSIGN(BackgroundServiceManager); | 66 DISALLOW_COPY_AND_ASSIGN(BackgroundServiceManager); |
66 }; | 67 }; |
67 | 68 |
68 } // namespace service_manager | 69 } // namespace service_manager |
69 | 70 |
70 #endif // SERVICES_SERVICE_MANAGER_BACKGROUND_BACKGROUND_SERVICE_MANAGER_H_ | 71 #endif // SERVICES_SERVICE_MANAGER_BACKGROUND_BACKGROUND_SERVICE_MANAGER_H_ |
OLD | NEW |