Restore resize throttling on Chrome OS
commit01f90f8825de3f9f11878b5f8dfabbac73bb169d
authorpiman@chromium.org <piman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Wed, 21 May 2014 23:28:45 +0000 (21 23:28 +0000)
committerpiman@chromium.org <piman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Wed, 21 May 2014 23:28:45 +0000 (21 23:28 +0000)
treeee86fb334ff931616754ef0fb29b7745ee6f24cb
parent87ae065fcf7946e737e4b9b6c507a758546c4ae1
Restore resize throttling on Chrome OS

r270786 removed DelegatedFrameHost::GetViewBoundsWithResizeLock, but
that was based on the wrong assumption, which is that the resize lock is
always taken at the same time as when RWHI sends the Resize message,
which is not true.

So, reintroduce that logic, although in a saner way. The RWHV is
responsible for throttling, it should be explicit about having 2 sizes:
1- the size that is set by the UI layers
2- the size that the renderer should be resized to.

They are different when throttling.

(1) stays RWHV::GetViewBounds().size().
(2) is introduced as RWHVBase::GetRequestedRendererSize().

BUG=374885

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@272011 0039d316-1c4b-4281-b951-d872f2087c98
content/browser/compositor/delegated_frame_host.cc
content/browser/compositor/delegated_frame_host.h
content/browser/renderer_host/render_widget_host_impl.cc
content/browser/renderer_host/render_widget_host_view_aura.cc
content/browser/renderer_host/render_widget_host_view_aura.h
content/browser/renderer_host/render_widget_host_view_aura_unittest.cc
content/browser/renderer_host/render_widget_host_view_base.cc
content/browser/renderer_host/render_widget_host_view_base.h