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/shell/runner/host/in_process_native_runner.h" | 5 #include "services/shell/runner/host/in_process_native_runner.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/callback_helpers.h" | 10 #include "base/callback_helpers.h" |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 CallLibraryEarlyInitialization(app_library); | 78 CallLibraryEarlyInitialization(app_library); |
79 #endif | 79 #endif |
80 RunNativeApplication(app_library, std::move(request_)); | 80 RunNativeApplication(app_library, std::move(request_)); |
81 app_completed_callback_runner_.Run(); | 81 app_completed_callback_runner_.Run(); |
82 app_completed_callback_runner_.Reset(); | 82 app_completed_callback_runner_.Reset(); |
83 } | 83 } |
84 | 84 |
85 std::unique_ptr<NativeRunner> InProcessNativeRunnerFactory::Create( | 85 std::unique_ptr<NativeRunner> InProcessNativeRunnerFactory::Create( |
86 const base::FilePath& app_path) { | 86 const base::FilePath& app_path) { |
87 // Non-Mojo apps are always run in a new process. | 87 // Non-Mojo apps are always run in a new process. |
88 if (!app_path.MatchesExtension(FILE_PATH_LITERAL(".mojo"))) { | 88 if (!app_path.MatchesExtension(FILE_PATH_LITERAL(".library"))) { |
89 return base::WrapUnique( | 89 return base::WrapUnique( |
90 new OutOfProcessNativeRunner(launch_process_runner_, nullptr)); | 90 new OutOfProcessNativeRunner(launch_process_runner_, nullptr)); |
91 } | 91 } |
92 return base::WrapUnique(new InProcessNativeRunner); | 92 return base::WrapUnique(new InProcessNativeRunner); |
93 } | 93 } |
94 | 94 |
95 } // namespace shell | 95 } // namespace shell |
OLD | NEW |