OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "content/browser/browser_child_process_host_impl.h" | 5 #include "content/browser/browser_child_process_host_impl.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/file_path.h" | 10 #include "base/file_path.h" |
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
135 switches::kVModule, | 135 switches::kVModule, |
136 }; | 136 }; |
137 cmd_line->CopySwitchesFrom(browser_command_line, kForwardSwitches, | 137 cmd_line->CopySwitchesFrom(browser_command_line, kForwardSwitches, |
138 arraysize(kForwardSwitches)); | 138 arraysize(kForwardSwitches)); |
139 | 139 |
140 child_process_.reset(new ChildProcessLauncher( | 140 child_process_.reset(new ChildProcessLauncher( |
141 #if defined(OS_WIN) | 141 #if defined(OS_WIN) |
142 exposed_dir, | 142 exposed_dir, |
143 #elif defined(OS_POSIX) | 143 #elif defined(OS_POSIX) |
144 use_zygote, | 144 use_zygote, |
| 145 data_.id, |
145 environ, | 146 environ, |
146 child_process_host_->TakeClientFileDescriptor(), | 147 child_process_host_->TakeClientFileDescriptor(), |
147 #endif | 148 #endif |
148 cmd_line, | 149 cmd_line, |
149 this)); | 150 this)); |
150 } | 151 } |
151 | 152 |
152 const ChildProcessData& BrowserChildProcessHostImpl::GetData() const { | 153 const ChildProcessData& BrowserChildProcessHostImpl::GetData() const { |
153 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); | 154 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
154 return data_; | 155 return data_; |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
267 } | 268 } |
268 | 269 |
269 void BrowserChildProcessHostImpl::OnProcessLaunched() { | 270 void BrowserChildProcessHostImpl::OnProcessLaunched() { |
270 if (!child_process_->GetHandle()) { | 271 if (!child_process_->GetHandle()) { |
271 delete delegate_; // Will delete us | 272 delete delegate_; // Will delete us |
272 return; | 273 return; |
273 } | 274 } |
274 data_.handle = child_process_->GetHandle(); | 275 data_.handle = child_process_->GetHandle(); |
275 delegate_->OnProcessLaunched(); | 276 delegate_->OnProcessLaunched(); |
276 } | 277 } |
OLD | NEW |