| 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 "shell/child_process_host.h" | 5 #include "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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 platform_channel_pair_.PrepareToPassClientHandleToChildProcess( | 74 platform_channel_pair_.PrepareToPassClientHandleToChildProcess( |
| 75 &child_command_line, &handle_passing_info); | 75 &child_command_line, &handle_passing_info); |
| 76 | 76 |
| 77 base::LaunchOptions options; | 77 base::LaunchOptions options; |
| 78 #if defined(OS_WIN) | 78 #if defined(OS_WIN) |
| 79 options.start_hidden = true; | 79 options.start_hidden = true; |
| 80 options.handles_to_inherit = &handle_passing_info; | 80 options.handles_to_inherit = &handle_passing_info; |
| 81 #elif defined(OS_POSIX) | 81 #elif defined(OS_POSIX) |
| 82 options.fds_to_remap = &handle_passing_info; | 82 options.fds_to_remap = &handle_passing_info; |
| 83 #endif | 83 #endif |
| 84 DVLOG(2) << "Launching child with command line: " |
| 85 << child_command_line.GetCommandLineString(); |
| 84 child_process_ = base::LaunchProcess(child_command_line, options); | 86 child_process_ = base::LaunchProcess(child_command_line, options); |
| 85 if (!child_process_.IsValid()) | 87 if (!child_process_.IsValid()) |
| 86 return false; | 88 return false; |
| 87 | 89 |
| 88 platform_channel_pair_.ChildProcessLaunched(); | 90 platform_channel_pair_.ChildProcessLaunched(); |
| 89 return true; | 91 return true; |
| 90 } | 92 } |
| 91 | 93 |
| 92 void ChildProcessHost::DidLaunch(bool success) { | 94 void ChildProcessHost::DidLaunch(bool success) { |
| 93 delegate_->DidStart(success); | 95 delegate_->DidStart(success); |
| 94 } | 96 } |
| 95 | 97 |
| 96 } // namespace shell | 98 } // namespace shell |
| 97 } // namespace mojo | 99 } // namespace mojo |
| OLD | NEW |