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 | |
212 void BrowserChildProcessHostImpl::SetTerminateChildOnShutdown( | 208 void BrowserChildProcessHostImpl::SetTerminateChildOnShutdown( |
213 bool terminate_on_shutdown) { | 209 bool terminate_on_shutdown) { |
214 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); | 210 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
215 child_process_->SetTerminateChildOnShutdown(terminate_on_shutdown); | 211 child_process_->SetTerminateChildOnShutdown(terminate_on_shutdown); |
216 } | 212 } |
217 | 213 |
218 void BrowserChildProcessHostImpl::NotifyProcessInstanceCreated( | 214 void BrowserChildProcessHostImpl::NotifyProcessInstanceCreated( |
219 const ChildProcessData& data) { | 215 const ChildProcessData& data) { |
220 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 216 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
221 FOR_EACH_OBSERVER(BrowserChildProcessObserver, g_observers.Get(), | 217 FOR_EACH_OBSERVER(BrowserChildProcessObserver, g_observers.Get(), |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
342 | 338 |
343 void BrowserChildProcessHostImpl::OnProcessExitedEarly( | 339 void BrowserChildProcessHostImpl::OnProcessExitedEarly( |
344 base::WaitableEvent* event) { | 340 base::WaitableEvent* event) { |
345 DeleteProcessWaitableEvent(event); | 341 DeleteProcessWaitableEvent(event); |
346 OnChildDisconnected(); | 342 OnChildDisconnected(); |
347 } | 343 } |
348 | 344 |
349 #endif | 345 #endif |
350 | 346 |
351 } // namespace content | 347 } // namespace content |
OLD | NEW |