Index: content/browser/renderer_host/render_process_host_impl.cc |
diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc |
index 6f45e67a50e8481e5fb2a3df79722d87ca6108d7..24ab01ccd921b533b83f2ffeb857bec6477007a6 100644 |
--- a/content/browser/renderer_host/render_process_host_impl.cc |
+++ b/content/browser/renderer_host/render_process_host_impl.cc |
@@ -1947,9 +1947,16 @@ void RenderProcessHostImpl::SetBackgrounded(bool backgrounded) { |
// is to not invoke the SetPriorityClass API if the dll is loaded. |
if (GetModuleHandle(L"cbstext.dll")) |
return; |
-#endif // OS_WIN |
+ // Windows Vista+ has a fancy process backgrounding mode that can only be set |
+ // from within the process. So notify the child process of background state. |
+ Send(new ChildProcessMsg_SetProcessBackgrounded(backgrounded)); |
+#else |
+ |
+ // Backgrounding may require elevated privileges not available to renderer |
+ // processes, so control backgrounding from the process host. |
child_process_launcher_->SetProcessBackgrounded(backgrounded); |
+#endif // OS_WIN |
} |
void RenderProcessHostImpl::OnProcessLaunched() { |
@@ -1966,7 +1973,7 @@ void RenderProcessHostImpl::OnProcessLaunched() { |
return; |
} |
- child_process_launcher_->SetProcessBackgrounded(backgrounded_); |
+ SetBackgrounded(backgrounded_); |
} |
// NOTE: This needs to be before sending queued messages because |