OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #include "services/service_manager/runner/host/out_of_process_native_runner.h" | 5 #include "services/service_manager/runner/host/out_of_process_native_runner.h" |
6 | 6 |
7 #include <stdint.h> | 7 #include <stdint.h> |
8 | 8 |
9 #include <utility> | 9 #include <utility> |
10 | 10 |
11 #include "base/bind.h" | 11 #include "base/bind.h" |
12 #include "base/callback_helpers.h" | 12 #include "base/callback_helpers.h" |
13 #include "base/files/file_util.h" | 13 #include "base/files/file_util.h" |
14 #include "base/logging.h" | 14 #include "base/logging.h" |
15 #include "base/memory/ptr_util.h" | 15 #include "base/memory/ptr_util.h" |
16 #include "base/task_runner.h" | 16 #include "base/task_runner.h" |
17 #include "services/service_manager/runner/common/client_util.h" | 17 #include "services/service_manager/runner/common/client_util.h" |
18 #include "services/service_manager/runner/host/child_process_host.h" | 18 #include "services/service_manager/runner/host/child_process_host.h" |
19 #include "services/service_manager/runner/host/in_process_native_runner.h" | 19 #include "services/service_manager/runner/host/in_process_native_runner.h" |
20 | 20 |
21 namespace shell { | 21 namespace service_manager { |
22 | 22 |
23 OutOfProcessNativeRunner::OutOfProcessNativeRunner( | 23 OutOfProcessNativeRunner::OutOfProcessNativeRunner( |
24 base::TaskRunner* launch_process_runner, | 24 base::TaskRunner* launch_process_runner, |
25 NativeRunnerDelegate* delegate) | 25 NativeRunnerDelegate* delegate) |
26 : launch_process_runner_(launch_process_runner), delegate_(delegate) {} | 26 : launch_process_runner_(launch_process_runner), delegate_(delegate) {} |
27 | 27 |
28 OutOfProcessNativeRunner::~OutOfProcessNativeRunner() { | 28 OutOfProcessNativeRunner::~OutOfProcessNativeRunner() { |
29 if (child_process_host_ && !app_path_.empty()) | 29 if (child_process_host_ && !app_path_.empty()) |
30 child_process_host_->Join(); | 30 child_process_host_->Join(); |
31 } | 31 } |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 NativeRunnerDelegate* delegate) | 65 NativeRunnerDelegate* delegate) |
66 : launch_process_runner_(launch_process_runner), delegate_(delegate) {} | 66 : launch_process_runner_(launch_process_runner), delegate_(delegate) {} |
67 OutOfProcessNativeRunnerFactory::~OutOfProcessNativeRunnerFactory() {} | 67 OutOfProcessNativeRunnerFactory::~OutOfProcessNativeRunnerFactory() {} |
68 | 68 |
69 std::unique_ptr<NativeRunner> OutOfProcessNativeRunnerFactory::Create( | 69 std::unique_ptr<NativeRunner> OutOfProcessNativeRunnerFactory::Create( |
70 const base::FilePath& app_path) { | 70 const base::FilePath& app_path) { |
71 return base::MakeUnique<OutOfProcessNativeRunner>(launch_process_runner_, | 71 return base::MakeUnique<OutOfProcessNativeRunner>(launch_process_runner_, |
72 delegate_); | 72 delegate_); |
73 } | 73 } |
74 | 74 |
75 } // namespace shell | 75 } // namespace service_manager |
OLD | NEW |