| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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.h" | 5 #include "content/browser/browser_child_process_host.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/file_path.h" | 8 #include "base/file_path.h" |
| 9 #include "base/lazy_instance.h" | 9 #include "base/lazy_instance.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 DCHECK(child_process_->GetHandle()) | 102 DCHECK(child_process_->GetHandle()) |
| 103 << "Requesting a child process handle before launch has completed OK."; | 103 << "Requesting a child process handle before launch has completed OK."; |
| 104 return child_process_->GetHandle(); | 104 return child_process_->GetHandle(); |
| 105 } | 105 } |
| 106 | 106 |
| 107 void BrowserChildProcessHost::ForceShutdown() { | 107 void BrowserChildProcessHost::ForceShutdown() { |
| 108 g_child_process_list.Get().remove(this); | 108 g_child_process_list.Get().remove(this); |
| 109 ChildProcessHost::ForceShutdown(); | 109 ChildProcessHost::ForceShutdown(); |
| 110 } | 110 } |
| 111 | 111 |
| 112 void BrowserChildProcessHost::SetTerminateChildOnShutdown( | |
| 113 bool terminate_on_shutdown) { | |
| 114 child_process_->SetTerminateChildOnShutdown(terminate_on_shutdown); | |
| 115 } | |
| 116 | |
| 117 void BrowserChildProcessHost::Notify(NotificationType type) { | 112 void BrowserChildProcessHost::Notify(NotificationType type) { |
| 118 BrowserThread::PostTask( | 113 BrowserThread::PostTask( |
| 119 BrowserThread::UI, FROM_HERE, new ChildNotificationTask(type, this)); | 114 BrowserThread::UI, FROM_HERE, new ChildNotificationTask(type, this)); |
| 120 } | 115 } |
| 121 | 116 |
| 122 base::TerminationStatus BrowserChildProcessHost::GetChildTerminationStatus( | 117 base::TerminationStatus BrowserChildProcessHost::GetChildTerminationStatus( |
| 123 int* exit_code) { | 118 int* exit_code) { |
| 124 return child_process_->GetChildTerminationStatus(exit_code); | 119 return child_process_->GetChildTerminationStatus(exit_code); |
| 125 } | 120 } |
| 126 | 121 |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 201 | 196 |
| 202 return *iterator_; | 197 return *iterator_; |
| 203 } while (true); | 198 } while (true); |
| 204 | 199 |
| 205 return NULL; | 200 return NULL; |
| 206 } | 201 } |
| 207 | 202 |
| 208 bool BrowserChildProcessHost::Iterator::Done() { | 203 bool BrowserChildProcessHost::Iterator::Done() { |
| 209 return iterator_ == g_child_process_list.Get().end(); | 204 return iterator_ == g_child_process_list.Get().end(); |
| 210 } | 205 } |
| OLD | NEW |