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 ef0fea26dba8b8e0b20ed6cf2c16d23d0ed90dc9..9225a30a7fd2f19f35d9618afe9c1a14f9de7f27 100644 |
--- a/content/browser/renderer_host/render_process_host_impl.cc |
+++ b/content/browser/renderer_host/render_process_host_impl.cc |
@@ -1969,9 +1969,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() { |
@@ -1988,7 +1995,7 @@ void RenderProcessHostImpl::OnProcessLaunched() { |
return; |
} |
- child_process_launcher_->SetProcessBackgrounded(backgrounded_); |
+ SetBackgrounded(backgrounded_); |
} |
// NOTE: This needs to be before sending queued messages because |