| 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 36607354a0fdac4acf0e775d41c133fe15693dec..a7086479109a6776a0cee8a506666da21844cf6f 100644
|
| --- a/cc/trees/layer_tree_host_impl.cc
|
| +++ b/cc/trees/layer_tree_host_impl.cc
|
| @@ -241,7 +241,8 @@ LayerTreeHostImpl::LayerTreeHostImpl(
|
| requires_high_res_to_draw_(false),
|
| is_likely_to_require_a_draw_(false),
|
| has_valid_compositor_frame_sink_(false),
|
| - mutator_(nullptr) {
|
| + mutator_(nullptr),
|
| + captured_scrollbar_layer_id_(Layer::INVALID_ID) {
|
| DCHECK(animation_host_);
|
| animation_host_->SetMutatorHostClient(this);
|
|
|
| @@ -3228,6 +3229,28 @@ float LayerTreeHostImpl::DeviceSpaceDistanceToLayer(
|
| device_viewport_point);
|
| }
|
|
|
| +void LayerTreeHostImpl::MouseDownAt(const gfx::Point& viewport_point) {
|
| + if (scroll_layer_id_when_mouse_over_scrollbar_ == Layer::INVALID_ID)
|
| + return;
|
| +
|
| + captured_scrollbar_layer_id_ = scroll_layer_id_when_mouse_over_scrollbar_;
|
| + ScrollbarAnimationController* animation_controller =
|
| + ScrollbarAnimationControllerForId(captured_scrollbar_layer_id_);
|
| + if (animation_controller)
|
| + animation_controller->DidCaptureScrollbarBegin();
|
| +}
|
| +
|
| +void LayerTreeHostImpl::MouseUp() {
|
| + if (captured_scrollbar_layer_id_ == Layer::INVALID_ID)
|
| + return;
|
| +
|
| + ScrollbarAnimationController* animation_controller =
|
| + ScrollbarAnimationControllerForId(captured_scrollbar_layer_id_);
|
| + if (animation_controller)
|
| + animation_controller->DidCaptureScrollbarEnd();
|
| + captured_scrollbar_layer_id_ = Layer::INVALID_ID;
|
| +}
|
| +
|
| void LayerTreeHostImpl::MouseMoveAt(const gfx::Point& viewport_point) {
|
| gfx::PointF device_viewport_point = gfx::ScalePoint(
|
| gfx::PointF(viewport_point), active_tree_->device_scale_factor());
|
|
|