| 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 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 133 const blink::WebFloatPoint& velocity, | 133 const blink::WebFloatPoint& velocity, |
| 134 const blink::WebSize& cumulative_scroll) { | 134 const blink::WebSize& cumulative_scroll) { |
| 135 return blink::Platform::Current()->CreateFlingAnimationCurve( | 135 return blink::Platform::Current()->CreateFlingAnimationCurve( |
| 136 device_source, velocity, cumulative_scroll); | 136 device_source, velocity, cumulative_scroll); |
| 137 } | 137 } |
| 138 | 138 |
| 139 void WidgetInputHandlerManager::DidOverscroll( | 139 void WidgetInputHandlerManager::DidOverscroll( |
| 140 const gfx::Vector2dF& accumulated_overscroll, | 140 const gfx::Vector2dF& accumulated_overscroll, |
| 141 const gfx::Vector2dF& latest_overscroll_delta, | 141 const gfx::Vector2dF& latest_overscroll_delta, |
| 142 const gfx::Vector2dF& current_fling_velocity, | 142 const gfx::Vector2dF& current_fling_velocity, |
| 143 const gfx::PointF& causal_event_viewport_point) { | 143 const gfx::PointF& causal_event_viewport_point, |
| 144 const cc::ScrollBoundaryBehavior& scroll_boundary_behavior) { |
| 144 ui::DidOverscrollParams params; | 145 ui::DidOverscrollParams params; |
| 145 params.accumulated_overscroll = accumulated_overscroll; | 146 params.accumulated_overscroll = accumulated_overscroll; |
| 146 params.latest_overscroll_delta = latest_overscroll_delta; | 147 params.latest_overscroll_delta = latest_overscroll_delta; |
| 147 params.current_fling_velocity = current_fling_velocity; | 148 params.current_fling_velocity = current_fling_velocity; |
| 148 params.causal_event_viewport_point = causal_event_viewport_point; | 149 params.causal_event_viewport_point = causal_event_viewport_point; |
| 150 params.scroll_boundary_behavior = scroll_boundary_behavior; |
| 149 if (legacy_host_message_sender_) { | 151 if (legacy_host_message_sender_) { |
| 150 legacy_host_message_sender_->Send(new InputHostMsg_DidOverscroll( | 152 legacy_host_message_sender_->Send(new InputHostMsg_DidOverscroll( |
| 151 legacy_host_message_routing_id_, params)); | 153 legacy_host_message_routing_id_, params)); |
| 152 } | 154 } |
| 153 } | 155 } |
| 154 | 156 |
| 155 void WidgetInputHandlerManager::DidStopFlinging() { | 157 void WidgetInputHandlerManager::DidStopFlinging() { |
| 156 if (legacy_host_message_sender_) { | 158 if (legacy_host_message_sender_) { |
| 157 legacy_host_message_sender_->Send( | 159 legacy_host_message_sender_->Send( |
| 158 new InputHostMsg_DidStopFlinging(legacy_host_message_routing_id_)); | 160 new InputHostMsg_DidStopFlinging(legacy_host_message_routing_id_)); |
| (...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 331 | 333 |
| 332 void WidgetInputHandlerManager::ObserveGestureEventOnCompositorThread( | 334 void WidgetInputHandlerManager::ObserveGestureEventOnCompositorThread( |
| 333 const blink::WebGestureEvent& gesture_event, | 335 const blink::WebGestureEvent& gesture_event, |
| 334 const cc::InputHandlerScrollResult& scroll_result) { | 336 const cc::InputHandlerScrollResult& scroll_result) { |
| 335 DCHECK(input_handler_proxy_->scroll_elasticity_controller()); | 337 DCHECK(input_handler_proxy_->scroll_elasticity_controller()); |
| 336 input_handler_proxy_->scroll_elasticity_controller() | 338 input_handler_proxy_->scroll_elasticity_controller() |
| 337 ->ObserveGestureEventAndResult(gesture_event, scroll_result); | 339 ->ObserveGestureEventAndResult(gesture_event, scroll_result); |
| 338 } | 340 } |
| 339 | 341 |
| 340 } // namespace content | 342 } // namespace content |
| OLD | NEW |