| OLD | NEW |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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 "content/renderer/input/widget_input_handler_manager.h" | 5 #include "content/renderer/input/widget_input_handler_manager.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 131 const blink::WebFloatPoint& velocity, | 131 const blink::WebFloatPoint& velocity, |
| 132 const blink::WebSize& cumulative_scroll) { | 132 const blink::WebSize& cumulative_scroll) { |
| 133 return blink::Platform::Current()->CreateFlingAnimationCurve( | 133 return blink::Platform::Current()->CreateFlingAnimationCurve( |
| 134 device_source, velocity, cumulative_scroll); | 134 device_source, velocity, cumulative_scroll); |
| 135 } | 135 } |
| 136 | 136 |
| 137 void WidgetInputHandlerManager::DidOverscroll( | 137 void WidgetInputHandlerManager::DidOverscroll( |
| 138 const gfx::Vector2dF& accumulated_overscroll, | 138 const gfx::Vector2dF& accumulated_overscroll, |
| 139 const gfx::Vector2dF& latest_overscroll_delta, | 139 const gfx::Vector2dF& latest_overscroll_delta, |
| 140 const gfx::Vector2dF& current_fling_velocity, | 140 const gfx::Vector2dF& current_fling_velocity, |
| 141 const gfx::PointF& causal_event_viewport_point) { | 141 const gfx::PointF& causal_event_viewport_point, |
| 142 const cc::ScrollBoundaryBehavior& scroll_boundary_behavior) { |
| 142 ui::DidOverscrollParams params; | 143 ui::DidOverscrollParams params; |
| 143 params.accumulated_overscroll = accumulated_overscroll; | 144 params.accumulated_overscroll = accumulated_overscroll; |
| 144 params.latest_overscroll_delta = latest_overscroll_delta; | 145 params.latest_overscroll_delta = latest_overscroll_delta; |
| 145 params.current_fling_velocity = current_fling_velocity; | 146 params.current_fling_velocity = current_fling_velocity; |
| 146 params.causal_event_viewport_point = causal_event_viewport_point; | 147 params.causal_event_viewport_point = causal_event_viewport_point; |
| 148 params.scroll_boundary_behavior = scroll_boundary_behavior; |
| 147 if (legacy_host_message_sender_) { | 149 if (legacy_host_message_sender_) { |
| 148 legacy_host_message_sender_->Send(new InputHostMsg_DidOverscroll( | 150 legacy_host_message_sender_->Send(new InputHostMsg_DidOverscroll( |
| 149 legacy_host_message_routing_id_, params)); | 151 legacy_host_message_routing_id_, params)); |
| 150 } | 152 } |
| 151 } | 153 } |
| 152 | 154 |
| 153 void WidgetInputHandlerManager::DidStopFlinging() { | 155 void WidgetInputHandlerManager::DidStopFlinging() { |
| 154 if (legacy_host_message_sender_) { | 156 if (legacy_host_message_sender_) { |
| 155 legacy_host_message_sender_->Send( | 157 legacy_host_message_sender_->Send( |
| 156 new InputHostMsg_DidStopFlinging(legacy_host_message_routing_id_)); | 158 new InputHostMsg_DidStopFlinging(legacy_host_message_routing_id_)); |
| (...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 329 | 331 |
| 330 void WidgetInputHandlerManager::ObserveGestureEventOnCompositorThread( | 332 void WidgetInputHandlerManager::ObserveGestureEventOnCompositorThread( |
| 331 const blink::WebGestureEvent& gesture_event, | 333 const blink::WebGestureEvent& gesture_event, |
| 332 const cc::InputHandlerScrollResult& scroll_result) { | 334 const cc::InputHandlerScrollResult& scroll_result) { |
| 333 DCHECK(input_handler_proxy_->scroll_elasticity_controller()); | 335 DCHECK(input_handler_proxy_->scroll_elasticity_controller()); |
| 334 input_handler_proxy_->scroll_elasticity_controller() | 336 input_handler_proxy_->scroll_elasticity_controller() |
| 335 ->ObserveGestureEventAndResult(gesture_event, scroll_result); | 337 ->ObserveGestureEventAndResult(gesture_event, scroll_result); |
| 336 } | 338 } |
| 337 | 339 |
| 338 } // namespace content | 340 } // namespace content |
| OLD | NEW |