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

Unified Diff: content/child/child_thread.cc

Issue 305533006: Control process backgrounding from within the child process on Windows. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix other platforms. Created 6 years, 7 months 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
Index: content/child/child_thread.cc
diff --git a/content/child/child_thread.cc b/content/child/child_thread.cc
index 0d2e7e0a34541821c0d4f866c05aa88704e70be2..fef733361d3377374e517c918d070eced2924f84 100644
--- a/content/child/child_thread.cc
+++ b/content/child/child_thread.cc
@@ -440,6 +440,10 @@ bool ChildThread::OnMessageReceived(const IPC::Message& msg) {
IPC_MESSAGE_HANDLER(ChildProcessMsg_GetChildProfilerData,
OnGetChildProfilerData)
IPC_MESSAGE_HANDLER(ChildProcessMsg_DumpHandles, OnDumpHandles)
+#if defined(OS_WIN)
+ IPC_MESSAGE_HANDLER(ChildProcessMsg_SetProcessBackgrounded,
+ OnProcessBackgrounded)
+#endif
#if defined(USE_TCMALLOC)
IPC_MESSAGE_HANDLER(ChildProcessMsg_GetTcmallocStats, OnGetTcmallocStats)
#endif
@@ -548,4 +552,10 @@ void ChildThread::EnsureConnected() {
base::KillProcess(base::GetCurrentProcessHandle(), 0, false);
}
+#if defined(OS_WIN)
+void ChildThread::OnProcessBackgrounded(bool background) {
+ base::Process::Current().SetProcessBackgrounded(background);
nasko 2014/05/28 23:08:37 Out of curiosity, does that work from inside the s
DaleCurtis 2014/05/29 00:06:59 Yup, I've confirmed the cpu, io priorities of the
+}
+#endif
+
} // namespace content

Powered by Google App Engine
This is Rietveld 408576698