OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "ui/events/blink/input_handler_proxy.h" | 5 #include "ui/events/blink/input_handler_proxy.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 | 10 |
(...skipping 892 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
903 } | 903 } |
904 } | 904 } |
905 cc::InputHandlerScrollResult scroll_result = | 905 cc::InputHandlerScrollResult scroll_result = |
906 input_handler_->ScrollBy(&scroll_state); | 906 input_handler_->ScrollBy(&scroll_state); |
907 | 907 |
908 if (!scroll_result.did_scroll && | 908 if (!scroll_result.did_scroll && |
909 input_handler_->ScrollingShouldSwitchtoMainThread() && | 909 input_handler_->ScrollingShouldSwitchtoMainThread() && |
910 gesture_event.source_device == blink::kWebGestureDeviceTouchpad && | 910 gesture_event.source_device == blink::kWebGestureDeviceTouchpad && |
911 touchpad_and_wheel_scroll_latching_enabled_) { | 911 touchpad_and_wheel_scroll_latching_enabled_) { |
912 gesture_scroll_on_impl_thread_ = false; | 912 gesture_scroll_on_impl_thread_ = false; |
| 913 client_->GenerateScrollBeginAndSendToMainThread(gesture_event); |
| 914 |
913 if (!gesture_pinch_on_impl_thread_) | 915 if (!gesture_pinch_on_impl_thread_) |
914 return DID_NOT_HANDLE; | 916 return DID_NOT_HANDLE; |
915 } | 917 } |
916 | 918 |
917 HandleOverscroll(scroll_point, scroll_result, true); | 919 HandleOverscroll(scroll_point, scroll_result, true); |
918 | 920 |
919 if (scroll_elasticity_controller_) | 921 if (scroll_elasticity_controller_) |
920 HandleScrollElasticityOverscroll(gesture_event, scroll_result); | 922 HandleScrollElasticityOverscroll(gesture_event, scroll_result); |
921 | 923 |
922 return scroll_result.did_scroll ? DID_HANDLE : DROP_EVENT; | 924 return scroll_result.did_scroll ? DID_HANDLE : DROP_EVENT; |
(...skipping 722 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1645 scroll_elasticity_controller_->GetWeakPtr(), gesture_event, | 1647 scroll_elasticity_controller_->GetWeakPtr(), gesture_event, |
1646 scroll_result)); | 1648 scroll_result)); |
1647 } | 1649 } |
1648 | 1650 |
1649 void InputHandlerProxy::SetTickClockForTesting( | 1651 void InputHandlerProxy::SetTickClockForTesting( |
1650 std::unique_ptr<base::TickClock> tick_clock) { | 1652 std::unique_ptr<base::TickClock> tick_clock) { |
1651 tick_clock_ = std::move(tick_clock); | 1653 tick_clock_ = std::move(tick_clock); |
1652 } | 1654 } |
1653 | 1655 |
1654 } // namespace ui | 1656 } // namespace ui |
OLD | NEW |