Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(109)

Side by Side Diff: mojo/shell/application_manager.cc

Issue 1419293003: Allow mojo_runner to connect to arbitrary executables. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « mojo/runner/out_of_process_native_runner.cc ('k') | mojo/shell/native_runner.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « mojo/runner/out_of_process_native_runner.cc ('k') | mojo/shell/native_runner.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698