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/child_process_host.h" | 5 #include "mojo/shell/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" |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 if (apps_to_debug.empty() || ContainsValue(apps_to_debug, name_)) | 115 if (apps_to_debug.empty() || ContainsValue(apps_to_debug, name_)) |
116 child_command_line.AppendSwitch(switches::kWaitForDebugger); | 116 child_command_line.AppendSwitch(switches::kWaitForDebugger); |
117 } | 117 } |
118 | 118 |
119 embedder::HandlePassingInformation handle_passing_info; | 119 embedder::HandlePassingInformation handle_passing_info; |
120 platform_channel_pair_.PrepareToPassClientHandleToChildProcess( | 120 platform_channel_pair_.PrepareToPassClientHandleToChildProcess( |
121 &child_command_line, &handle_passing_info); | 121 &child_command_line, &handle_passing_info); |
122 | 122 |
123 base::LaunchOptions options; | 123 base::LaunchOptions options; |
124 #if defined(OS_WIN) | 124 #if defined(OS_WIN) |
125 options.start_hidden = true; | |
126 options.handles_to_inherit = &handle_passing_info; | 125 options.handles_to_inherit = &handle_passing_info; |
127 #elif defined(OS_POSIX) | 126 #elif defined(OS_POSIX) |
128 options.fds_to_remap = &handle_passing_info; | 127 options.fds_to_remap = &handle_passing_info; |
129 #endif | 128 #endif |
130 DVLOG(2) << "Launching child with command line: " | 129 DVLOG(2) << "Launching child with command line: " |
131 << child_command_line.GetCommandLineString(); | 130 << child_command_line.GetCommandLineString(); |
132 child_process_ = base::LaunchProcess(child_command_line, options); | 131 child_process_ = base::LaunchProcess(child_command_line, options); |
133 if (!child_process_.IsValid()) | 132 if (!child_process_.IsValid()) |
134 return false; | 133 return false; |
135 | 134 |
(...skipping 11 matching lines...) Expand all Loading... |
147 | 146 |
148 void ChildProcessHost::DidCreateChannel(embedder::ChannelInfo* channel_info) { | 147 void ChildProcessHost::DidCreateChannel(embedder::ChannelInfo* channel_info) { |
149 DVLOG(2) << "AppChildProcessHost::DidCreateChannel()"; | 148 DVLOG(2) << "AppChildProcessHost::DidCreateChannel()"; |
150 | 149 |
151 CHECK(channel_info); | 150 CHECK(channel_info); |
152 channel_info_ = channel_info; | 151 channel_info_ = channel_info; |
153 } | 152 } |
154 | 153 |
155 } // namespace shell | 154 } // namespace shell |
156 } // namespace mojo | 155 } // namespace mojo |
OLD | NEW |