Index: cc/trees/layer_tree_host_impl.cc |
diff --git a/cc/trees/layer_tree_host_impl.cc b/cc/trees/layer_tree_host_impl.cc |
index 77c484fd1a4a6bef187c2bec963533ec8a750c4f..08b0ad143c64556b96b609750aca5d3502faf9fd 100644 |
--- a/cc/trees/layer_tree_host_impl.cc |
+++ b/cc/trees/layer_tree_host_impl.cc |
@@ -67,6 +67,7 @@ |
#include "cc/trees/layer_tree_impl.h" |
#include "cc/trees/occlusion_tracker.h" |
#include "cc/trees/single_thread_proxy.h" |
+#include "cc/trees/tree_scroll_elasticity_client.h" |
#include "cc/trees/tree_synchronizer.h" |
#include "gpu/command_buffer/client/gles2_interface.h" |
#include "gpu/GLES2/gl2extchromium.h" |
@@ -278,6 +279,8 @@ LayerTreeHostImpl::LayerTreeHostImpl( |
wheel_scrolling_(false), |
scroll_affects_scroll_handler_(false), |
scroll_layer_id_when_mouse_over_scrollbar_(0), |
+ scroll_elasticity_client_( |
+ new TreeScrollElasticityClient(this)), |
tile_priorities_dirty_(false), |
root_layer_scroll_offset_delegate_(NULL), |
settings_(settings), |
@@ -459,6 +462,10 @@ bool LayerTreeHostImpl::CanDraw() const { |
void LayerTreeHostImpl::Animate(base::TimeTicks monotonic_time) { |
if (input_handler_client_) |
input_handler_client_->Animate(monotonic_time); |
+ if (scroll_elasticity_client_->controller()) { |
+ scroll_elasticity_client_->controller()->Animate( |
+ monotonic_time); |
+ } |
AnimatePageScale(monotonic_time); |
AnimateLayers(monotonic_time); |
AnimateScrollbars(monotonic_time); |
@@ -515,6 +522,11 @@ LayerTreeHostImpl::CreateLatencyInfoSwapPromiseMonitor( |
new LatencyInfoSwapPromiseMonitor(latency, NULL, this)); |
} |
+ScrollElasticityControllerClient* |
+ LayerTreeHostImpl::GetScrollElasticityControllerClient() { |
+ return scroll_elasticity_client_.get(); |
+} |
+ |
void LayerTreeHostImpl::QueueSwapPromiseForMainThreadScrollUpdate( |
scoped_ptr<SwapPromise> swap_promise) { |
swap_promises_for_main_thread_scroll_update_.push_back(swap_promise.Pass()); |