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 b797c1c96963d761622d6a32b841d68ea1a25712..d807836acdd07857cc2f7fdcd0d5fb171341b572 100644 |
--- a/cc/trees/layer_tree_host_impl.cc |
+++ b/cc/trees/layer_tree_host_impl.cc |
@@ -65,6 +65,7 @@ |
#include "cc/trees/layer_tree_host.h" |
#include "cc/trees/layer_tree_host_common.h" |
#include "cc/trees/layer_tree_impl.h" |
+#include "cc/trees/layer_tree_scroll_elasticity_client.h" |
#include "cc/trees/occlusion_tracker.h" |
#include "cc/trees/single_thread_proxy.h" |
#include "cc/trees/tree_synchronizer.h" |
@@ -281,6 +282,8 @@ LayerTreeHostImpl::~LayerTreeHostImpl() { |
input_handler_client_->WillShutdown(); |
input_handler_client_ = NULL; |
} |
+ if (scroll_elasticity_client_) |
+ scroll_elasticity_client_.reset(); |
// The layer trees must be destroyed before the layer tree host. We've |
// made a contract with our animation controllers that the registrar |
@@ -394,6 +397,8 @@ 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_) |
+ scroll_elasticity_client_->Animate(monotonic_time); |
AnimatePageScale(monotonic_time); |
AnimateLayers(monotonic_time); |
AnimateScrollbars(monotonic_time); |
@@ -450,6 +455,13 @@ LayerTreeHostImpl::CreateLatencyInfoSwapPromiseMonitor( |
new LatencyInfoSwapPromiseMonitor(latency, NULL, this)); |
} |
+ScrollElasticityControllerClient* |
+LayerTreeHostImpl::GetScrollElasticityControllerClient() { |
+ if (!scroll_elasticity_client_) |
+ scroll_elasticity_client_.reset(new LayerTreeScrollElasticityClient(this)); |
+ 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()); |