| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "content/child/child_thread.h" | 5 #include "content/child/child_thread.h" |
| 6 | 6 |
| 7 #include <signal.h> | 7 #include <signal.h> |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 549 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 560 void ChildThread::OnProcessBackgrounded(bool background) { | 560 void ChildThread::OnProcessBackgrounded(bool background) { |
| 561 // Set timer slack to maximum on main thread when in background. | 561 // Set timer slack to maximum on main thread when in background. |
| 562 base::TimerSlack timer_slack = base::TIMER_SLACK_NONE; | 562 base::TimerSlack timer_slack = base::TIMER_SLACK_NONE; |
| 563 if (background) | 563 if (background) |
| 564 timer_slack = base::TIMER_SLACK_MAXIMUM; | 564 timer_slack = base::TIMER_SLACK_MAXIMUM; |
| 565 base::MessageLoop::current()->SetTimerSlack(timer_slack); | 565 base::MessageLoop::current()->SetTimerSlack(timer_slack); |
| 566 | 566 |
| 567 #ifdef OS_WIN | 567 #ifdef OS_WIN |
| 568 // Windows Vista+ has a fancy process backgrounding mode that can only be set | 568 // Windows Vista+ has a fancy process backgrounding mode that can only be set |
| 569 // from within the process. | 569 // from within the process. |
| 570 base::Process::Current().SetProcessBackgrounded(background); | 570 // TODO(wfh) Do not set background from within process until the issue with |
| 571 // white tabs is resolved. See http://crbug.com/398103. |
| 572 // base::Process::Current().SetProcessBackgrounded(background); |
| 571 #endif // OS_WIN | 573 #endif // OS_WIN |
| 572 } | 574 } |
| 573 | 575 |
| 574 } // namespace content | 576 } // namespace content |
| OLD | NEW |