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

Side by Side Diff: mojo/shell/runner/host/in_process_native_runner.cc

Issue 1736663003: Eliminate Quit() from Shell, and roll Shell & Connector together. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@14cf
Patch Set: . Created 4 years, 10 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 unified diff | Download patch
« no previous file with comments | « mojo/shell/runner/child/manifest.json ('k') | no next file » | 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/runner/host/in_process_native_runner.h" 5 #include "mojo/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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 43
44 DCHECK(!request_.is_pending()); 44 DCHECK(!request_.is_pending());
45 request_ = std::move(request); 45 request_ = std::move(request);
46 46
47 DCHECK(app_completed_callback_runner_.is_null()); 47 DCHECK(app_completed_callback_runner_.is_null());
48 app_completed_callback_runner_ = base::Bind( 48 app_completed_callback_runner_ = base::Bind(
49 &base::TaskRunner::PostTask, base::ThreadTaskRunnerHandle::Get(), 49 &base::TaskRunner::PostTask, base::ThreadTaskRunnerHandle::Get(),
50 FROM_HERE, app_completed_callback); 50 FROM_HERE, app_completed_callback);
51 51
52 DCHECK(!thread_); 52 DCHECK(!thread_);
53 thread_.reset(new base::DelegateSimpleThread(this, "app_thread")); 53 std::string thread_name = "mojo:app_thread";
54 thread_.reset(new base::DelegateSimpleThread(this, thread_name));
54 thread_->Start(); 55 thread_->Start();
55 pid_available_callback.Run(base::kNullProcessId); 56 pid_available_callback.Run(base::kNullProcessId);
56 } 57 }
57 58
58 void InProcessNativeRunner::InitHost( 59 void InProcessNativeRunner::InitHost(
59 ScopedHandle channel, 60 ScopedHandle channel,
60 InterfaceRequest<mojom::ShellClient> request) { 61 InterfaceRequest<mojom::ShellClient> request) {
61 NOTREACHED(); // Can't host another process in this runner. 62 NOTREACHED(); // Can't host another process in this runner.
62 } 63 }
63 64
(...skipping 20 matching lines...) Expand all
84 // Non-Mojo apps are always run in a new process. 85 // Non-Mojo apps are always run in a new process.
85 if (!app_path.MatchesExtension(FILE_PATH_LITERAL(".mojo"))) { 86 if (!app_path.MatchesExtension(FILE_PATH_LITERAL(".mojo"))) {
86 return make_scoped_ptr( 87 return make_scoped_ptr(
87 new OutOfProcessNativeRunner(launch_process_runner_, nullptr)); 88 new OutOfProcessNativeRunner(launch_process_runner_, nullptr));
88 } 89 }
89 return make_scoped_ptr(new InProcessNativeRunner); 90 return make_scoped_ptr(new InProcessNativeRunner);
90 } 91 }
91 92
92 } // namespace shell 93 } // namespace shell
93 } // namespace mojo 94 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/shell/runner/child/manifest.json ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698