| 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 1322 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1333 | 1333 |
| 1334 if (disallow_vertical_fling_scroll_ && disallow_horizontal_fling_scroll_) | 1334 if (disallow_vertical_fling_scroll_ && disallow_horizontal_fling_scroll_) |
| 1335 fling_is_active = false; | 1335 fling_is_active = false; |
| 1336 | 1336 |
| 1337 if (fling_is_active) { | 1337 if (fling_is_active) { |
| 1338 RequestAnimation(); | 1338 RequestAnimation(); |
| 1339 } else { | 1339 } else { |
| 1340 TRACE_EVENT_INSTANT0("input", | 1340 TRACE_EVENT_INSTANT0("input", |
| 1341 "InputHandlerProxy::animate::flingOver", | 1341 "InputHandlerProxy::animate::flingOver", |
| 1342 TRACE_EVENT_SCOPE_THREAD); | 1342 TRACE_EVENT_SCOPE_THREAD); |
| 1343 CancelCurrentFling(); | 1343 if (fling_parameters_.source_device != |
| 1344 blink::kWebGestureDeviceSyntheticAutoscroll) |
| 1345 CancelCurrentFling(); |
| 1344 } | 1346 } |
| 1345 } | 1347 } |
| 1346 | 1348 |
| 1347 void InputHandlerProxy::MainThreadHasStoppedFlinging() { | 1349 void InputHandlerProxy::MainThreadHasStoppedFlinging() { |
| 1348 fling_may_be_active_on_main_thread_ = false; | 1350 fling_may_be_active_on_main_thread_ = false; |
| 1349 client_->DidStopFlinging(); | 1351 client_->DidStopFlinging(); |
| 1350 } | 1352 } |
| 1351 | 1353 |
| 1352 void InputHandlerProxy::ReconcileElasticOverscrollAndRootScroll() { | 1354 void InputHandlerProxy::ReconcileElasticOverscrollAndRootScroll() { |
| 1353 if (scroll_elasticity_controller_) | 1355 if (scroll_elasticity_controller_) |
| (...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1661 scroll_elasticity_controller_->GetWeakPtr(), gesture_event, | 1663 scroll_elasticity_controller_->GetWeakPtr(), gesture_event, |
| 1662 scroll_result)); | 1664 scroll_result)); |
| 1663 } | 1665 } |
| 1664 | 1666 |
| 1665 void InputHandlerProxy::SetTickClockForTesting( | 1667 void InputHandlerProxy::SetTickClockForTesting( |
| 1666 std::unique_ptr<base::TickClock> tick_clock) { | 1668 std::unique_ptr<base::TickClock> tick_clock) { |
| 1667 tick_clock_ = std::move(tick_clock); | 1669 tick_clock_ = std::move(tick_clock); |
| 1668 } | 1670 } |
| 1669 | 1671 |
| 1670 } // namespace ui | 1672 } // namespace ui |
| OLD | NEW |