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

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: Rebase. Disable test. 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
« no previous file with comments | « content/child/child_thread.h ('k') | content/common/child_process_messages.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/child/child_thread.cc
diff --git a/content/child/child_thread.cc b/content/child/child_thread.cc
index 2c06e247ef1ad9a05527af8728ffeb4f08c9e6a5..ab276a67fc7f4126d9d90b46f57736cdd735a362 100644
--- a/content/child/child_thread.cc
+++ b/content/child/child_thread.cc
@@ -441,6 +441,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
@@ -549,4 +553,10 @@ void ChildThread::EnsureConnected() {
base::KillProcess(base::GetCurrentProcessHandle(), 0, false);
}
+#if defined(OS_WIN)
+void ChildThread::OnProcessBackgrounded(bool background) {
+ base::Process::Current().SetProcessBackgrounded(background);
+}
+#endif
+
} // namespace content
« no previous file with comments | « content/child/child_thread.h ('k') | content/common/child_process_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698