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/bind.h" | 7 #include "base/bind.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/file_path.h" | 9 #include "base/file_path.h" |
10 #include "base/lazy_instance.h" | 10 #include "base/lazy_instance.h" |
(...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
306 } else { | 306 } else { |
307 BrowserChildProcessHostImpl::OnChildDisconnected(); | 307 BrowserChildProcessHostImpl::OnChildDisconnected(); |
308 } | 308 } |
309 #endif | 309 #endif |
310 } | 310 } |
311 | 311 |
312 bool BrowserChildProcessHostImpl::Send(IPC::Message* message) { | 312 bool BrowserChildProcessHostImpl::Send(IPC::Message* message) { |
313 return child_process_host_->Send(message); | 313 return child_process_host_->Send(message); |
314 } | 314 } |
315 | 315 |
316 void BrowserChildProcessHostImpl::ShutdownStarted() { | |
317 // Must remove the process from the list now, in case it gets used for a | |
318 // new instance before our watcher tells us that the process terminated. | |
319 g_child_process_list.Get().remove(this); | |
320 } | |
321 | |
322 | |
323 void BrowserChildProcessHostImpl::OnProcessLaunched() { | 316 void BrowserChildProcessHostImpl::OnProcessLaunched() { |
324 if (!child_process_->GetHandle()) { | 317 if (!child_process_->GetHandle()) { |
325 delete delegate_; // Will delete us | 318 delete delegate_; // Will delete us |
326 return; | 319 return; |
327 } | 320 } |
328 data_.handle = child_process_->GetHandle(); | 321 data_.handle = child_process_->GetHandle(); |
329 delegate_->OnProcessLaunched(); | 322 delegate_->OnProcessLaunched(); |
330 } | 323 } |
OLD | NEW |