summaryrefslogtreecommitdiffstats
path: root/content/browser/browser_child_process_host_impl.cc
diff options
context:
space:
mode:
authorsimonhatch@chromium.org <simonhatch@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-05-18 00:14:46 +0000
committersimonhatch@chromium.org <simonhatch@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-05-18 00:14:46 +0000
commitb378803abc532b532711f519938b674ce38a34b9 (patch)
treefef2ad193651bf237f7590f1e11c3130287a99be /content/browser/browser_child_process_host_impl.cc
parent2311180d3e340526faf2f72240e9b2443f3ff22c (diff)
downloadchromium_src-b378803abc532b532711f519938b674ce38a34b9.zip
chromium_src-b378803abc532b532711f519938b674ce38a34b9.tar.gz
chromium_src-b378803abc532b532711f519938b674ce38a34b9.tar.bz2
Lower the priority of shared workers that aren't associated with the foreground tab.
This should help out less powerful devices in the case where there's a shared worker in another tab and a cpu intensive page in the foreground. BUG= TEST=Open a doc, see webworker running, switch tabs and check webworker's priority by outputting contents of /sys/fs/cgroup/cpu/chrome_renderers/background/cgroup.proc on ChromeOS. With an open doc in a background tab, run 720p video (ie. youtube) at fullscreen, should stay fairly smooth. Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=199840 Review URL: https://chromiumcodereview.appspot.com/14137016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@200932 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/browser/browser_child_process_host_impl.cc')
-rw-r--r--content/browser/browser_child_process_host_impl.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/content/browser/browser_child_process_host_impl.cc b/content/browser/browser_child_process_host_impl.cc
index 6a2218f..9851e8c 100644
--- a/content/browser/browser_child_process_host_impl.cc
+++ b/content/browser/browser_child_process_host_impl.cc
@@ -205,6 +205,10 @@ void BrowserChildProcessHostImpl::ForceShutdown() {
child_process_host_->ForceShutdown();
}
+void BrowserChildProcessHostImpl::SetBackgrounded(bool backgrounded) {
+ child_process_->SetProcessBackgrounded(backgrounded);
+}
+
void BrowserChildProcessHostImpl::SetTerminateChildOnShutdown(
bool terminate_on_shutdown) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));