| 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 1422 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1433 // Bundle overscroll message with triggering event response, saving an IPC. | 1433 // Bundle overscroll message with triggering event response, saving an IPC. |
| 1434 current_overscroll_params_.reset(new DidOverscrollParams()); | 1434 current_overscroll_params_.reset(new DidOverscrollParams()); |
| 1435 current_overscroll_params_->accumulated_overscroll = | 1435 current_overscroll_params_->accumulated_overscroll = |
| 1436 scroll_result.accumulated_root_overscroll; | 1436 scroll_result.accumulated_root_overscroll; |
| 1437 current_overscroll_params_->latest_overscroll_delta = | 1437 current_overscroll_params_->latest_overscroll_delta = |
| 1438 scroll_result.unused_scroll_delta; | 1438 scroll_result.unused_scroll_delta; |
| 1439 current_overscroll_params_->current_fling_velocity = | 1439 current_overscroll_params_->current_fling_velocity = |
| 1440 ToClientScrollIncrement(current_fling_velocity_); | 1440 ToClientScrollIncrement(current_fling_velocity_); |
| 1441 current_overscroll_params_->causal_event_viewport_point = | 1441 current_overscroll_params_->causal_event_viewport_point = |
| 1442 gfx::PointF(causal_event_viewport_point); | 1442 gfx::PointF(causal_event_viewport_point); |
| 1443 current_overscroll_params_->scroll_boundary_behavior = |
| 1444 scroll_result.scroll_boundary_behavior; |
| 1443 return; | 1445 return; |
| 1444 } | 1446 } |
| 1445 | 1447 |
| 1446 client_->DidOverscroll(scroll_result.accumulated_root_overscroll, | 1448 client_->DidOverscroll(scroll_result.accumulated_root_overscroll, |
| 1447 scroll_result.unused_scroll_delta, | 1449 scroll_result.unused_scroll_delta, |
| 1448 ToClientScrollIncrement(current_fling_velocity_), | 1450 ToClientScrollIncrement(current_fling_velocity_), |
| 1449 gfx::PointF(causal_event_viewport_point)); | 1451 gfx::PointF(causal_event_viewport_point), |
| 1452 scroll_result.scroll_boundary_behavior); |
| 1450 } | 1453 } |
| 1451 | 1454 |
| 1452 bool InputHandlerProxy::CancelCurrentFling() { | 1455 bool InputHandlerProxy::CancelCurrentFling() { |
| 1453 if (CancelCurrentFlingWithoutNotifyingClient()) { | 1456 if (CancelCurrentFlingWithoutNotifyingClient()) { |
| 1454 client_->DidStopFlinging(); | 1457 client_->DidStopFlinging(); |
| 1455 return true; | 1458 return true; |
| 1456 } | 1459 } |
| 1457 return false; | 1460 return false; |
| 1458 } | 1461 } |
| 1459 | 1462 |
| (...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1661 scroll_elasticity_controller_->GetWeakPtr(), gesture_event, | 1664 scroll_elasticity_controller_->GetWeakPtr(), gesture_event, |
| 1662 scroll_result)); | 1665 scroll_result)); |
| 1663 } | 1666 } |
| 1664 | 1667 |
| 1665 void InputHandlerProxy::SetTickClockForTesting( | 1668 void InputHandlerProxy::SetTickClockForTesting( |
| 1666 std::unique_ptr<base::TickClock> tick_clock) { | 1669 std::unique_ptr<base::TickClock> tick_clock) { |
| 1667 tick_clock_ = std::move(tick_clock); | 1670 tick_clock_ = std::move(tick_clock); |
| 1668 } | 1671 } |
| 1669 | 1672 |
| 1670 } // namespace ui | 1673 } // namespace ui |
| OLD | NEW |