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 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
130 | 130 |
131 child_process_.reset(new ChildProcessLauncher( | 131 child_process_.reset(new ChildProcessLauncher( |
132 #if defined(OS_WIN) | 132 #if defined(OS_WIN) |
133 exposed_dir, | 133 exposed_dir, |
134 #elif defined(OS_POSIX) | 134 #elif defined(OS_POSIX) |
135 use_zygote, | 135 use_zygote, |
136 environ, | 136 environ, |
137 child_process_host_->TakeClientFileDescriptor(), | 137 child_process_host_->TakeClientFileDescriptor(), |
138 #endif | 138 #endif |
139 cmd_line, | 139 cmd_line, |
| 140 data_.id, |
140 this)); | 141 this)); |
141 } | 142 } |
142 | 143 |
143 const ChildProcessData& BrowserChildProcessHostImpl::GetData() const { | 144 const ChildProcessData& BrowserChildProcessHostImpl::GetData() const { |
144 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); | 145 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
145 return data_; | 146 return data_; |
146 } | 147 } |
147 | 148 |
148 ChildProcessHost* BrowserChildProcessHostImpl::GetHost() const { | 149 ChildProcessHost* BrowserChildProcessHostImpl::GetHost() const { |
149 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); | 150 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
260 void BrowserChildProcessHostImpl::OnProcessLaunched() { | 261 void BrowserChildProcessHostImpl::OnProcessLaunched() { |
261 if (!child_process_->GetHandle()) { | 262 if (!child_process_->GetHandle()) { |
262 delete delegate_; // Will delete us | 263 delete delegate_; // Will delete us |
263 return; | 264 return; |
264 } | 265 } |
265 data_.handle = child_process_->GetHandle(); | 266 data_.handle = child_process_->GetHandle(); |
266 delegate_->OnProcessLaunched(); | 267 delegate_->OnProcessLaunched(); |
267 } | 268 } |
268 | 269 |
269 } // namespace content | 270 } // namespace content |
OLD | NEW |