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

Side by Side Diff: mojo/runner/child_process_host.cc

Issue 1127293003: Update mojo sdk to rev f84766d3b6420b7cf6a113d9d65d73cb5fe18d90 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: formatting Created 5 years, 7 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/gles2/command_buffer_client_impl.cc ('k') | mojo/runner/shell_test_base.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/runner/child_process_host.h" 5 #include "mojo/runner/child_process_host.h"
6 6
7 #include "base/base_switches.h" 7 #include "base/base_switches.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/location.h" 10 #include "base/location.h"
11 #include "base/logging.h" 11 #include "base/logging.h"
12 #include "base/macros.h" 12 #include "base/macros.h"
13 #include "base/message_loop/message_loop.h" 13 #include "base/message_loop/message_loop.h"
14 #include "base/process/kill.h" 14 #include "base/process/kill.h"
15 #include "base/process/launch.h" 15 #include "base/process/launch.h"
16 #include "base/task_runner.h" 16 #include "base/task_runner.h"
17 #include "base/task_runner_util.h" 17 #include "base/task_runner_util.h"
18 #include "mojo/edk/embedder/embedder.h" 18 #include "mojo/edk/embedder/embedder.h"
19 #include "mojo/public/cpp/bindings/interface_ptr_info.h"
19 #include "mojo/public/cpp/system/core.h" 20 #include "mojo/public/cpp/system/core.h"
20 #include "mojo/runner/context.h" 21 #include "mojo/runner/context.h"
21 #include "mojo/runner/switches.h" 22 #include "mojo/runner/switches.h"
22 #include "mojo/runner/task_runners.h" 23 #include "mojo/runner/task_runners.h"
23 #include "ui/gl/gl_switches.h" 24 #include "ui/gl/gl_switches.h"
24 25
25 namespace mojo { 26 namespace mojo {
26 namespace runner { 27 namespace runner {
27 28
28 ChildProcessHost::ChildProcessHost(Context* context, const std::string& name) 29 ChildProcessHost::ChildProcessHost(Context* context, const std::string& name)
(...skipping 12 matching lines...) Expand all
41 42
42 void ChildProcessHost::Start() { 43 void ChildProcessHost::Start() {
43 DCHECK(!child_process_.IsValid()); 44 DCHECK(!child_process_.IsValid());
44 DCHECK(platform_channel_.is_valid()); 45 DCHECK(platform_channel_.is_valid());
45 46
46 ScopedMessagePipeHandle handle(embedder::CreateChannel( 47 ScopedMessagePipeHandle handle(embedder::CreateChannel(
47 platform_channel_.Pass(), context_->task_runners()->io_runner(), 48 platform_channel_.Pass(), context_->task_runners()->io_runner(),
48 base::Bind(&ChildProcessHost::DidCreateChannel, base::Unretained(this)), 49 base::Bind(&ChildProcessHost::DidCreateChannel, base::Unretained(this)),
49 base::MessageLoop::current()->message_loop_proxy())); 50 base::MessageLoop::current()->message_loop_proxy()));
50 51
51 controller_.Bind(handle.Pass()); 52 controller_.Bind(InterfacePtrInfo<ChildController>(handle.Pass(), 0u));
52 53
53 CHECK(base::PostTaskAndReplyWithResult( 54 CHECK(base::PostTaskAndReplyWithResult(
54 context_->task_runners()->blocking_pool(), FROM_HERE, 55 context_->task_runners()->blocking_pool(), FROM_HERE,
55 base::Bind(&ChildProcessHost::DoLaunch, base::Unretained(this)), 56 base::Bind(&ChildProcessHost::DoLaunch, base::Unretained(this)),
56 base::Bind(&ChildProcessHost::DidStart, base::Unretained(this)))); 57 base::Bind(&ChildProcessHost::DidStart, base::Unretained(this))));
57 } 58 }
58 59
59 int ChildProcessHost::Join() { 60 int ChildProcessHost::Join() {
60 DCHECK(child_process_.IsValid()); 61 DCHECK(child_process_.IsValid());
61 int rv = -1; 62 int rv = -1;
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 146
146 void ChildProcessHost::DidCreateChannel(embedder::ChannelInfo* channel_info) { 147 void ChildProcessHost::DidCreateChannel(embedder::ChannelInfo* channel_info) {
147 DVLOG(2) << "AppChildProcessHost::DidCreateChannel()"; 148 DVLOG(2) << "AppChildProcessHost::DidCreateChannel()";
148 149
149 CHECK(channel_info); 150 CHECK(channel_info);
150 channel_info_ = channel_info; 151 channel_info_ = channel_info;
151 } 152 }
152 153
153 } // namespace runner 154 } // namespace runner
154 } // namespace mojo 155 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/gles2/command_buffer_client_impl.cc ('k') | mojo/runner/shell_test_base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698