| 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 "shell/out_of_process_dynamic_service_runner.h" | 5 #include "shell/out_of_process_dynamic_service_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 "base/scoped_native_library.h" | 11 #include "base/scoped_native_library.h" |
| 12 #include "shell/in_process_dynamic_service_runner.h" |
| 12 | 13 |
| 13 namespace mojo { | 14 namespace mojo { |
| 14 namespace shell { | 15 namespace shell { |
| 15 | 16 |
| 16 OutOfProcessDynamicServiceRunner::OutOfProcessDynamicServiceRunner( | 17 OutOfProcessDynamicServiceRunner::OutOfProcessDynamicServiceRunner( |
| 17 Context* context) | 18 Context* context) |
| 18 : context_(context) { | 19 : context_(context) { |
| 19 } | 20 } |
| 20 | 21 |
| 21 OutOfProcessDynamicServiceRunner::~OutOfProcessDynamicServiceRunner() { | 22 OutOfProcessDynamicServiceRunner::~OutOfProcessDynamicServiceRunner() { |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 DVLOG(2) << "OutOfProcessDynamicServiceRunner::AppCompleted(" << result | 54 DVLOG(2) << "OutOfProcessDynamicServiceRunner::AppCompleted(" << result |
| 54 << ")"; | 55 << ")"; |
| 55 | 56 |
| 56 app_child_process_host_.reset(); | 57 app_child_process_host_.reset(); |
| 57 // This object may be deleted by this callback. | 58 // This object may be deleted by this callback. |
| 58 base::Closure app_completed_callback = app_completed_callback_; | 59 base::Closure app_completed_callback = app_completed_callback_; |
| 59 app_completed_callback_.Reset(); | 60 app_completed_callback_.Reset(); |
| 60 app_completed_callback.Run(); | 61 app_completed_callback.Run(); |
| 61 } | 62 } |
| 62 | 63 |
| 64 scoped_ptr<NativeRunner> OutOfProcessDynamicServiceRunnerFactory::Create( |
| 65 const Options& options) { |
| 66 if (options.force_in_process) |
| 67 return make_scoped_ptr(new InProcessDynamicServiceRunner(context_)); |
| 68 |
| 69 return make_scoped_ptr(new OutOfProcessDynamicServiceRunner(context_)); |
| 70 } |
| 71 |
| 63 } // namespace shell | 72 } // namespace shell |
| 64 } // namespace mojo | 73 } // namespace mojo |
| OLD | NEW |