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 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
187 BrowserThread::UI, | 187 BrowserThread::UI, |
188 FROM_HERE, | 188 FROM_HERE, |
189 base::Bind(&ChildNotificationHelper, type, data_)); | 189 base::Bind(&ChildNotificationHelper, type, data_)); |
190 } | 190 } |
191 | 191 |
192 base::TerminationStatus BrowserChildProcessHostImpl::GetTerminationStatus( | 192 base::TerminationStatus BrowserChildProcessHostImpl::GetTerminationStatus( |
193 int* exit_code) { | 193 int* exit_code) { |
194 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); | 194 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
195 if (!child_process_.get()) // If the delegate doesn't use Launch() helper. | 195 if (!child_process_.get()) // If the delegate doesn't use Launch() helper. |
196 return base::GetTerminationStatus(data_.handle, exit_code); | 196 return base::GetTerminationStatus(data_.handle, exit_code); |
197 return child_process_->GetChildTerminationStatus(exit_code); | 197 return child_process_->GetChildTerminationStatus(false /* known_dead */, |
| 198 exit_code); |
198 } | 199 } |
199 | 200 |
200 bool BrowserChildProcessHostImpl::OnMessageReceived( | 201 bool BrowserChildProcessHostImpl::OnMessageReceived( |
201 const IPC::Message& message) { | 202 const IPC::Message& message) { |
202 return delegate_->OnMessageReceived(message); | 203 return delegate_->OnMessageReceived(message); |
203 } | 204 } |
204 | 205 |
205 void BrowserChildProcessHostImpl::OnChannelConnected(int32 peer_pid) { | 206 void BrowserChildProcessHostImpl::OnChannelConnected(int32 peer_pid) { |
206 Notify(NOTIFICATION_CHILD_PROCESS_HOST_CONNECTED); | 207 Notify(NOTIFICATION_CHILD_PROCESS_HOST_CONNECTED); |
207 delegate_->OnChannelConnected(peer_pid); | 208 delegate_->OnChannelConnected(peer_pid); |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
261 void BrowserChildProcessHostImpl::OnProcessLaunched() { | 262 void BrowserChildProcessHostImpl::OnProcessLaunched() { |
262 if (!child_process_->GetHandle()) { | 263 if (!child_process_->GetHandle()) { |
263 delete delegate_; // Will delete us | 264 delete delegate_; // Will delete us |
264 return; | 265 return; |
265 } | 266 } |
266 data_.handle = child_process_->GetHandle(); | 267 data_.handle = child_process_->GetHandle(); |
267 delegate_->OnProcessLaunched(); | 268 delegate_->OnProcessLaunched(); |
268 } | 269 } |
269 | 270 |
270 } // namespace content | 271 } // namespace content |
OLD | NEW |