Index: content/browser/child_process_launcher.cc |
diff --git a/content/browser/child_process_launcher.cc b/content/browser/child_process_launcher.cc |
index 5a7be486f07814d5cb67fbfb65a039502363dc96..60a7c72351c90a5e422aa054cc55b6948d5851b4 100644 |
--- a/content/browser/child_process_launcher.cc |
+++ b/content/browser/child_process_launcher.cc |
@@ -12,6 +12,7 @@ |
#include "base/files/scoped_file.h" |
#include "base/logging.h" |
#include "base/memory/scoped_ptr.h" |
+#include "base/metrics/field_trial.h" |
#include "base/metrics/histogram.h" |
#include "base/process/process.h" |
#include "base/synchronization/lock.h" |
@@ -503,7 +504,12 @@ void ChildProcessLauncher::Context::Terminate() { |
void ChildProcessLauncher::Context::SetProcessBackgroundedInternal( |
base::Process process, |
bool background) { |
+#if defined(OS_MACOSX) |
+ MachBroker* broker = MachBroker::GetInstance(); |
+ process.SetProcessBackgrounded(broker->TaskForPid(process.Pid()), background); |
+#else |
process.SetProcessBackgrounded(background); |
+#endif // defined(OS_MACOSX) |
#if defined(OS_ANDROID) |
SetChildProcessInForeground(process.Handle(), !background); |
#endif |