[renderer]: Inform the RendererScheduler when the Renderer is hidden.
commitaa296052b95e0dae75c75bfe6f32a15c4ad56ee7
authorrmcilroy <rmcilroy@chromium.org>
Tue, 14 Apr 2015 15:35:27 +0000 (14 08:35 -0700)
committerCommit bot <commit-bot@chromium.org>
Tue, 14 Apr 2015 15:36:06 +0000 (14 15:36 +0000)
tree9c7fdb950b5a3bb7e5e9fcf439c133eb771d2296
parent640680854e3e1aade94f131408129c8de2244bcc
[renderer]: Inform the RendererScheduler when the Renderer is hidden.

Add OnRendererVisible and OnRendererHidden to the RendererSheduler to
enable it to be informed if the renderer goes in and out of the
background. When backgrounded we start a long idle period, but set a
delayed task to end the idle period after 10 seconds to ensure we
eventually stop running idle tasks while in the background.

BUG=468414,469210

Review URL: https://codereview.chromium.org/1024123002

Cr-Commit-Position: refs/heads/master@{#325056}
content/renderer/render_thread_impl.cc
content/renderer/render_thread_impl.h
content/renderer/render_widget.cc
content/renderer/scheduler/null_renderer_scheduler.cc
content/renderer/scheduler/null_renderer_scheduler.h
content/renderer/scheduler/renderer_scheduler.h
content/renderer/scheduler/renderer_scheduler_impl.cc
content/renderer/scheduler/renderer_scheduler_impl.h
content/renderer/scheduler/renderer_scheduler_impl_unittest.cc
content/test/fake_renderer_scheduler.cc
content/test/fake_renderer_scheduler.h