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 |
112 void BrowserChildProcessHost::Notify(NotificationType type) { | 117 void BrowserChildProcessHost::Notify(NotificationType type) { |
113 BrowserThread::PostTask( | 118 BrowserThread::PostTask( |
114 BrowserThread::UI, FROM_HERE, new ChildNotificationTask(type, this)); | 119 BrowserThread::UI, FROM_HERE, new ChildNotificationTask(type, this)); |
115 } | 120 } |
116 | 121 |
117 base::TerminationStatus BrowserChildProcessHost::GetChildTerminationStatus( | 122 base::TerminationStatus BrowserChildProcessHost::GetChildTerminationStatus( |
118 int* exit_code) { | 123 int* exit_code) { |
119 return child_process_->GetChildTerminationStatus(exit_code); | 124 return child_process_->GetChildTerminationStatus(exit_code); |
120 } | 125 } |
121 | 126 |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
196 | 201 |
197 return *iterator_; | 202 return *iterator_; |
198 } while (true); | 203 } while (true); |
199 | 204 |
200 return NULL; | 205 return NULL; |
201 } | 206 } |
202 | 207 |
203 bool BrowserChildProcessHost::Iterator::Done() { | 208 bool BrowserChildProcessHost::Iterator::Done() { |
204 return iterator_ == g_child_process_list.Get().end(); | 209 return iterator_ == g_child_process_list.Get().end(); |
205 } | 210 } |
OLD | NEW |