diff options
author | simonhatch@chromium.org <simonhatch@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-05-18 00:14:46 +0000 |
---|---|---|
committer | simonhatch@chromium.org <simonhatch@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-05-18 00:14:46 +0000 |
commit | b378803abc532b532711f519938b674ce38a34b9 (patch) | |
tree | fef2ad193651bf237f7590f1e11c3130287a99be /content/browser/browser_child_process_host_impl.h | |
parent | 2311180d3e340526faf2f72240e9b2443f3ff22c (diff) | |
download | chromium_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.h')
-rw-r--r-- | content/browser/browser_child_process_host_impl.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/content/browser/browser_child_process_host_impl.h b/content/browser/browser_child_process_host_impl.h index e3fdcb5..9933ca3 100644 --- a/content/browser/browser_child_process_host_impl.h +++ b/content/browser/browser_child_process_host_impl.h @@ -61,6 +61,9 @@ class CONTENT_EXPORT BrowserChildProcessHostImpl // Removes this host from the host list. Calls ChildProcessHost::ForceShutdown void ForceShutdown(); + // Callers can reduce the BrowserChildProcess' priority. + void SetBackgrounded(bool backgrounded); + // Controls whether the child process should be terminated on browser // shutdown. Default is to always terminate. void SetTerminateChildOnShutdown(bool terminate_on_shutdown); |