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 // Represents the browser side of the browser <--> renderer communication | 5 // Represents the browser side of the browser <--> renderer communication |
6 // channel. There will be one RenderProcessHost per renderer process. | 6 // channel. There will be one RenderProcessHost per renderer process. |
7 | 7 |
8 #include "content/browser/renderer_host/render_process_host_impl.h" | 8 #include "content/browser/renderer_host/render_process_host_impl.h" |
9 | 9 |
10 #include <algorithm> | 10 #include <algorithm> |
(...skipping 2201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2212 | 2212 |
2213 void RenderProcessHostImpl::OnSuddenTerminationChanged(bool enabled) { | 2213 void RenderProcessHostImpl::OnSuddenTerminationChanged(bool enabled) { |
2214 sudden_termination_allowed_ = enabled; | 2214 sudden_termination_allowed_ = enabled; |
2215 } | 2215 } |
2216 | 2216 |
2217 void RenderProcessHostImpl::OnDumpHandlesDone() { | 2217 void RenderProcessHostImpl::OnDumpHandlesDone() { |
2218 Cleanup(); | 2218 Cleanup(); |
2219 } | 2219 } |
2220 | 2220 |
2221 void RenderProcessHostImpl::SetBackgrounded(bool backgrounded) { | 2221 void RenderProcessHostImpl::SetBackgrounded(bool backgrounded) { |
| 2222 TRACE_EVENT1("renderer_host", "RenderProcessHostImpl::SetBackgrounded", |
| 2223 "backgrounded", backgrounded); |
2222 // Note: we always set the backgrounded_ value. If the process is NULL | 2224 // Note: we always set the backgrounded_ value. If the process is NULL |
2223 // (and hence hasn't been created yet), we will set the process priority | 2225 // (and hence hasn't been created yet), we will set the process priority |
2224 // later when we create the process. | 2226 // later when we create the process. |
2225 backgrounded_ = backgrounded; | 2227 backgrounded_ = backgrounded; |
2226 if (!child_process_launcher_.get() || child_process_launcher_->IsStarting()) | 2228 if (!child_process_launcher_.get() || child_process_launcher_->IsStarting()) |
2227 return; | 2229 return; |
2228 | 2230 |
2229 // Don't background processes which have active audio streams. | 2231 // Don't background processes which have active audio streams. |
2230 if (backgrounded_ && audio_renderer_host_->HasActiveAudio()) | 2232 if (backgrounded_ && audio_renderer_host_->HasActiveAudio()) |
2231 return; | 2233 return; |
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2485 if (worker_ref_count_ == 0) | 2487 if (worker_ref_count_ == 0) |
2486 Cleanup(); | 2488 Cleanup(); |
2487 } | 2489 } |
2488 | 2490 |
2489 void RenderProcessHostImpl::GetAudioOutputControllers( | 2491 void RenderProcessHostImpl::GetAudioOutputControllers( |
2490 const GetAudioOutputControllersCallback& callback) const { | 2492 const GetAudioOutputControllersCallback& callback) const { |
2491 audio_renderer_host()->GetOutputControllers(callback); | 2493 audio_renderer_host()->GetOutputControllers(callback); |
2492 } | 2494 } |
2493 | 2495 |
2494 } // namespace content | 2496 } // namespace content |
OLD | NEW |