Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(967)

Unified Diff: content/browser/renderer_host/render_process_host_impl.cc

Issue 2454073003: Allow backgrounding processes on Mac (Closed)
Patch Set: Address review comments Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/child_process_launcher.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 4e6840a7bf374b2cd1b97b0a3dc987b555cffd12..97f3a6d416721c3bc2143044269dc1c648d49307 100644
--- a/content/browser/renderer_host/render_process_host_impl.cc
+++ b/content/browser/renderer_host/render_process_host_impl.cc
@@ -2804,8 +2804,14 @@ void RenderProcessHostImpl::OnProcessLaunched() {
// Not all platforms launch processes in the same backgrounded state. Make
// sure |is_process_backgrounded_| reflects this platform's initial process
// state.
+#if defined(OS_MACOSX)
+ is_process_backgrounded_ =
+ child_process_launcher_->GetProcess().IsProcessBackgrounded(
+ MachBroker::GetInstance());
+#else
is_process_backgrounded_ =
child_process_launcher_->GetProcess().IsProcessBackgrounded();
+#endif // defined(OS_MACOSX)
// Disable updating process priority on startup for now as it incorrectly
// results in backgrounding foreground navigations until their first commit
« no previous file with comments | « content/browser/child_process_launcher.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698