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

Unified Diff: mojo/shell/runner/host/out_of_process_native_runner.cc

Issue 1877753003: Move mojo\shell to services\shell (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@62scan
Patch Set: . Created 4 years, 8 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « mojo/shell/runner/host/out_of_process_native_runner.h ('k') | mojo/shell/runner/init.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/shell/runner/host/out_of_process_native_runner.cc
diff --git a/mojo/shell/runner/host/out_of_process_native_runner.cc b/mojo/shell/runner/host/out_of_process_native_runner.cc
deleted file mode 100644
index 30104ddfd64605c8ddbd04df02b3775c08b61435..0000000000000000000000000000000000000000
--- a/mojo/shell/runner/host/out_of_process_native_runner.cc
+++ /dev/null
@@ -1,76 +0,0 @@
-// Copyright 2014 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "mojo/shell/runner/host/out_of_process_native_runner.h"
-
-#include <stdint.h>
-
-#include <utility>
-
-#include "base/bind.h"
-#include "base/callback_helpers.h"
-#include "base/files/file_util.h"
-#include "base/logging.h"
-#include "base/task_runner.h"
-#include "mojo/shell/runner/common/client_util.h"
-#include "mojo/shell/runner/host/child_process_host.h"
-#include "mojo/shell/runner/host/in_process_native_runner.h"
-
-namespace mojo {
-namespace shell {
-
-OutOfProcessNativeRunner::OutOfProcessNativeRunner(
- base::TaskRunner* launch_process_runner,
- NativeRunnerDelegate* delegate)
- : launch_process_runner_(launch_process_runner), delegate_(delegate) {}
-
-OutOfProcessNativeRunner::~OutOfProcessNativeRunner() {
- if (child_process_host_ && !app_path_.empty())
- child_process_host_->Join();
-}
-
-mojom::ShellClientPtr OutOfProcessNativeRunner::Start(
- const base::FilePath& app_path,
- const Identity& target,
- bool start_sandboxed,
- const base::Callback<void(base::ProcessId)>& pid_available_callback,
- const base::Closure& app_completed_callback) {
- app_path_ = app_path;
-
- DCHECK(app_completed_callback_.is_null());
- app_completed_callback_ = app_completed_callback;
-
- child_process_host_.reset(new ChildProcessHost(
- launch_process_runner_, delegate_, start_sandboxed, target, app_path));
- return child_process_host_->Start(
- target, pid_available_callback,
- base::Bind(&OutOfProcessNativeRunner::AppCompleted,
- base::Unretained(this)));
-}
-
-void OutOfProcessNativeRunner::AppCompleted() {
- if (child_process_host_)
- child_process_host_->Join();
- child_process_host_.reset();
- // This object may be deleted by this callback.
- base::Closure app_completed_callback = app_completed_callback_;
- app_completed_callback_.Reset();
- if (!app_completed_callback.is_null())
- app_completed_callback.Run();
-}
-
-OutOfProcessNativeRunnerFactory::OutOfProcessNativeRunnerFactory(
- base::TaskRunner* launch_process_runner,
- NativeRunnerDelegate* delegate)
- : launch_process_runner_(launch_process_runner), delegate_(delegate) {}
-OutOfProcessNativeRunnerFactory::~OutOfProcessNativeRunnerFactory() {}
-
-scoped_ptr<shell::NativeRunner> OutOfProcessNativeRunnerFactory::Create(
- const base::FilePath& app_path) {
- return make_scoped_ptr(
- new OutOfProcessNativeRunner(launch_process_runner_, delegate_));
-}
-
-} // namespace shell
-} // namespace mojo
« no previous file with comments | « mojo/shell/runner/host/out_of_process_native_runner.h ('k') | mojo/shell/runner/init.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698