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/shell/application_manager.h" | 5 #include "mojo/shell/application_manager.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
213 DCHECK(application_request.is_pending()); | 213 DCHECK(application_request.is_pending()); |
214 | 214 |
215 if (!path_exists) { | 215 if (!path_exists) { |
216 LOG(ERROR) << "Library not started because library path '" << path.value() | 216 LOG(ERROR) << "Library not started because library path '" << path.value() |
217 << "' does not exist."; | 217 << "' does not exist."; |
218 return; | 218 return; |
219 } | 219 } |
220 | 220 |
221 TRACE_EVENT1("mojo_shell", "ApplicationManager::RunNativeApplication", "path", | 221 TRACE_EVENT1("mojo_shell", "ApplicationManager::RunNativeApplication", "path", |
222 path.AsUTF8Unsafe()); | 222 path.AsUTF8Unsafe()); |
223 NativeRunner* runner = native_runner_factory_->Create().release(); | 223 NativeRunner* runner = native_runner_factory_->Create(path).release(); |
224 native_runners_.push_back(runner); | 224 native_runners_.push_back(runner); |
225 runner->Start(path, start_sandboxed, application_request.Pass(), | 225 runner->Start(path, start_sandboxed, application_request.Pass(), |
226 base::Bind(&ApplicationManager::CleanupRunner, | 226 base::Bind(&ApplicationManager::CleanupRunner, |
227 weak_ptr_factory_.GetWeakPtr(), runner)); | 227 weak_ptr_factory_.GetWeakPtr(), runner)); |
228 } | 228 } |
229 | 229 |
230 void ApplicationManager::SetLoaderForURL(scoped_ptr<ApplicationLoader> loader, | 230 void ApplicationManager::SetLoaderForURL(scoped_ptr<ApplicationLoader> loader, |
231 const GURL& url) { | 231 const GURL& url) { |
232 URLToLoaderMap::iterator it = url_to_loader_.find(url); | 232 URLToLoaderMap::iterator it = url_to_loader_.find(url); |
233 if (it != url_to_loader_.end()) | 233 if (it != url_to_loader_.end()) |
(...skipping 26 matching lines...) Expand all Loading... |
260 native_runners_.erase( | 260 native_runners_.erase( |
261 std::find(native_runners_.begin(), native_runners_.end(), runner)); | 261 std::find(native_runners_.begin(), native_runners_.end(), runner)); |
262 } | 262 } |
263 | 263 |
264 Shell::ConnectToApplicationCallback EmptyConnectCallback() { | 264 Shell::ConnectToApplicationCallback EmptyConnectCallback() { |
265 return base::Bind(&OnEmptyOnConnectCallback); | 265 return base::Bind(&OnEmptyOnConnectCallback); |
266 } | 266 } |
267 | 267 |
268 } // namespace shell | 268 } // namespace shell |
269 } // namespace mojo | 269 } // namespace mojo |
OLD | NEW |