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 "mojo/runner/out_of_process_native_runner.h" | 5 #include "mojo/runner/out_of_process_native_runner.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/callback_helpers.h" | 8 #include "base/callback_helpers.h" |
9 #include "base/files/file_util.h" | 9 #include "base/files/file_util.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
11 #include "mojo/runner/child_process.mojom.h" | |
12 #include "mojo/runner/child_process_host.h" | 11 #include "mojo/runner/child_process_host.h" |
13 #include "mojo/runner/in_process_native_runner.h" | 12 #include "mojo/runner/in_process_native_runner.h" |
14 | 13 |
15 namespace mojo { | 14 namespace mojo { |
16 namespace runner { | 15 namespace runner { |
17 | 16 |
18 OutOfProcessNativeRunner::OutOfProcessNativeRunner(Context* context) | 17 OutOfProcessNativeRunner::OutOfProcessNativeRunner(Context* context) |
19 : context_(context) { | 18 : context_(context) { |
20 } | 19 } |
21 | 20 |
(...skipping 27 matching lines...) Expand all Loading... |
49 | 48 |
50 if (child_process_host_) | 49 if (child_process_host_) |
51 child_process_host_->Join(); | 50 child_process_host_->Join(); |
52 child_process_host_.reset(); | 51 child_process_host_.reset(); |
53 // This object may be deleted by this callback. | 52 // This object may be deleted by this callback. |
54 base::Closure app_completed_callback = app_completed_callback_; | 53 base::Closure app_completed_callback = app_completed_callback_; |
55 app_completed_callback_.Reset(); | 54 app_completed_callback_.Reset(); |
56 app_completed_callback.Run(); | 55 app_completed_callback.Run(); |
57 } | 56 } |
58 | 57 |
59 scoped_ptr<shell::NativeRunner> OutOfProcessNativeRunnerFactory::Create() { | 58 scoped_ptr<shell::NativeRunner> OutOfProcessNativeRunnerFactory::Create( |
| 59 const base::FilePath& app_path) { |
60 return make_scoped_ptr(new OutOfProcessNativeRunner(context_)); | 60 return make_scoped_ptr(new OutOfProcessNativeRunner(context_)); |
61 } | 61 } |
62 | 62 |
63 } // namespace runner | 63 } // namespace runner |
64 } // namespace mojo | 64 } // namespace mojo |
OLD | NEW |