| 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 2210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2221 if (GetModuleHandle(L"cbstext.dll")) | 2221 if (GetModuleHandle(L"cbstext.dll")) |
| 2222 return; | 2222 return; |
| 2223 #endif // OS_WIN | 2223 #endif // OS_WIN |
| 2224 | 2224 |
| 2225 #if defined(OS_WIN) | 2225 #if defined(OS_WIN) |
| 2226 // Same as below, but bound to an experiment (http://crbug.com/458594) | 2226 // Same as below, but bound to an experiment (http://crbug.com/458594) |
| 2227 // initially on Windows. Enabled by default in the asbence of field trials to | 2227 // initially on Windows. Enabled by default in the asbence of field trials to |
| 2228 // get coverage on the perf waterfall. | 2228 // get coverage on the perf waterfall. |
| 2229 base::FieldTrial* trial = | 2229 base::FieldTrial* trial = |
| 2230 base::FieldTrialList::Find("BackgroundRendererProcesses"); | 2230 base::FieldTrialList::Find("BackgroundRendererProcesses"); |
| 2231 if (!trial || (trial->group_name() != "Disallow" && | 2231 if (trial && (trial->group_name() != "Disallow" && |
| 2232 trial->group_name() != "AllowBackgroundModeFromRenderer")) { | 2232 trial->group_name() != "AllowBackgroundModeFromRenderer")) { |
| 2233 child_process_launcher_->SetProcessBackgrounded(backgrounded); | 2233 child_process_launcher_->SetProcessBackgrounded(backgrounded); |
| 2234 } | 2234 } |
| 2235 #else | 2235 #else |
| 2236 // Control the background state from the browser process, otherwise the task | 2236 // Control the background state from the browser process, otherwise the task |
| 2237 // telling the renderer to "unbackground" itself may be preempted by other | 2237 // telling the renderer to "unbackground" itself may be preempted by other |
| 2238 // tasks executing at lowered priority ahead of it or simply by not being | 2238 // tasks executing at lowered priority ahead of it or simply by not being |
| 2239 // swiftly scheduled by the OS per the low process priority | 2239 // swiftly scheduled by the OS per the low process priority |
| 2240 // (http://crbug.com/398103). | 2240 // (http://crbug.com/398103). |
| 2241 child_process_launcher_->SetProcessBackgrounded(backgrounded); | 2241 child_process_launcher_->SetProcessBackgrounded(backgrounded); |
| 2242 #endif // OS_WIN | 2242 #endif // OS_WIN |
| (...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2460 if (worker_ref_count_ == 0) | 2460 if (worker_ref_count_ == 0) |
| 2461 Cleanup(); | 2461 Cleanup(); |
| 2462 } | 2462 } |
| 2463 | 2463 |
| 2464 void RenderProcessHostImpl::GetAudioOutputControllers( | 2464 void RenderProcessHostImpl::GetAudioOutputControllers( |
| 2465 const GetAudioOutputControllersCallback& callback) const { | 2465 const GetAudioOutputControllersCallback& callback) const { |
| 2466 audio_renderer_host()->GetOutputControllers(callback); | 2466 audio_renderer_host()->GetOutputControllers(callback); |
| 2467 } | 2467 } |
| 2468 | 2468 |
| 2469 } // namespace content | 2469 } // namespace content |
| OLD | NEW |