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/files/file_path.h" | 10 #include "base/files/file_path.h" |
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
198 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); | 198 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
199 data_.handle = handle; | 199 data_.handle = handle; |
200 } | 200 } |
201 | 201 |
202 void BrowserChildProcessHostImpl::ForceShutdown() { | 202 void BrowserChildProcessHostImpl::ForceShutdown() { |
203 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); | 203 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
204 g_child_process_list.Get().remove(this); | 204 g_child_process_list.Get().remove(this); |
205 child_process_host_->ForceShutdown(); | 205 child_process_host_->ForceShutdown(); |
206 } | 206 } |
207 | 207 |
| 208 void BrowserChildProcessHostImpl::SetBackgrounded(bool backgrounded) { |
| 209 child_process_->SetProcessBackgrounded(backgrounded); |
| 210 } |
| 211 |
208 void BrowserChildProcessHostImpl::SetTerminateChildOnShutdown( | 212 void BrowserChildProcessHostImpl::SetTerminateChildOnShutdown( |
209 bool terminate_on_shutdown) { | 213 bool terminate_on_shutdown) { |
210 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); | 214 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
211 child_process_->SetTerminateChildOnShutdown(terminate_on_shutdown); | 215 child_process_->SetTerminateChildOnShutdown(terminate_on_shutdown); |
212 } | 216 } |
213 | 217 |
214 void BrowserChildProcessHostImpl::NotifyProcessInstanceCreated( | 218 void BrowserChildProcessHostImpl::NotifyProcessInstanceCreated( |
215 const ChildProcessData& data) { | 219 const ChildProcessData& data) { |
216 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 220 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
217 FOR_EACH_OBSERVER(BrowserChildProcessObserver, g_observers.Get(), | 221 FOR_EACH_OBSERVER(BrowserChildProcessObserver, g_observers.Get(), |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
338 | 342 |
339 void BrowserChildProcessHostImpl::OnProcessExitedEarly( | 343 void BrowserChildProcessHostImpl::OnProcessExitedEarly( |
340 base::WaitableEvent* event) { | 344 base::WaitableEvent* event) { |
341 DeleteProcessWaitableEvent(event); | 345 DeleteProcessWaitableEvent(event); |
342 OnChildDisconnected(); | 346 OnChildDisconnected(); |
343 } | 347 } |
344 | 348 |
345 #endif | 349 #endif |
346 | 350 |
347 } // namespace content | 351 } // namespace content |
OLD | NEW |