| 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 2232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2243 if (GetModuleHandle(L"cbstext.dll")) | 2243 if (GetModuleHandle(L"cbstext.dll")) |
| 2244 return; | 2244 return; |
| 2245 #endif // OS_WIN | 2245 #endif // OS_WIN |
| 2246 | 2246 |
| 2247 #if defined(OS_WIN) | 2247 #if defined(OS_WIN) |
| 2248 // Same as below, but bound to an experiment (http://crbug.com/458594) | 2248 // Same as below, but bound to an experiment (http://crbug.com/458594) |
| 2249 // initially on Windows. Enabled by default in the asbence of field trials to | 2249 // initially on Windows. Enabled by default in the asbence of field trials to |
| 2250 // get coverage on the perf waterfall. | 2250 // get coverage on the perf waterfall. |
| 2251 base::FieldTrial* trial = | 2251 base::FieldTrial* trial = |
| 2252 base::FieldTrialList::Find("BackgroundRendererProcesses"); | 2252 base::FieldTrialList::Find("BackgroundRendererProcesses"); |
| 2253 if (!trial || (trial->group_name() != "Disallow" && | 2253 if (!trial || trial->group_name() != "Disallow") |
| 2254 trial->group_name() != "AllowBackgroundModeFromRenderer")) { | |
| 2255 child_process_launcher_->SetProcessBackgrounded(backgrounded); | 2254 child_process_launcher_->SetProcessBackgrounded(backgrounded); |
| 2256 } | |
| 2257 #else | 2255 #else |
| 2258 // Control the background state from the browser process, otherwise the task | 2256 // Control the background state from the browser process, otherwise the task |
| 2259 // telling the renderer to "unbackground" itself may be preempted by other | 2257 // telling the renderer to "unbackground" itself may be preempted by other |
| 2260 // tasks executing at lowered priority ahead of it or simply by not being | 2258 // tasks executing at lowered priority ahead of it or simply by not being |
| 2261 // swiftly scheduled by the OS per the low process priority | 2259 // swiftly scheduled by the OS per the low process priority |
| 2262 // (http://crbug.com/398103). | 2260 // (http://crbug.com/398103). |
| 2263 child_process_launcher_->SetProcessBackgrounded(backgrounded); | 2261 child_process_launcher_->SetProcessBackgrounded(backgrounded); |
| 2264 #endif // OS_WIN | 2262 #endif // OS_WIN |
| 2265 | 2263 |
| 2266 // Notify the child process of background state. | 2264 // Notify the child process of background state. |
| (...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2482 if (worker_ref_count_ == 0) | 2480 if (worker_ref_count_ == 0) |
| 2483 Cleanup(); | 2481 Cleanup(); |
| 2484 } | 2482 } |
| 2485 | 2483 |
| 2486 void RenderProcessHostImpl::GetAudioOutputControllers( | 2484 void RenderProcessHostImpl::GetAudioOutputControllers( |
| 2487 const GetAudioOutputControllersCallback& callback) const { | 2485 const GetAudioOutputControllersCallback& callback) const { |
| 2488 audio_renderer_host()->GetOutputControllers(callback); | 2486 audio_renderer_host()->GetOutputControllers(callback); |
| 2489 } | 2487 } |
| 2490 | 2488 |
| 2491 } // namespace content | 2489 } // namespace content |
| OLD | NEW |