| 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 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 148 const blink::WebFloatPoint& velocity, | 148 const blink::WebFloatPoint& velocity, |
| 149 const blink::WebSize& cumulative_scroll) { | 149 const blink::WebSize& cumulative_scroll) { |
| 150 return blink::Platform::Current()->CreateFlingAnimationCurve( | 150 return blink::Platform::Current()->CreateFlingAnimationCurve( |
| 151 device_source, velocity, cumulative_scroll); | 151 device_source, velocity, cumulative_scroll); |
| 152 } | 152 } |
| 153 | 153 |
| 154 void WidgetInputHandlerManager::DidOverscroll( | 154 void WidgetInputHandlerManager::DidOverscroll( |
| 155 const gfx::Vector2dF& accumulated_overscroll, | 155 const gfx::Vector2dF& accumulated_overscroll, |
| 156 const gfx::Vector2dF& latest_overscroll_delta, | 156 const gfx::Vector2dF& latest_overscroll_delta, |
| 157 const gfx::Vector2dF& current_fling_velocity, | 157 const gfx::Vector2dF& current_fling_velocity, |
| 158 const gfx::PointF& causal_event_viewport_point) { | 158 const gfx::PointF& causal_event_viewport_point, |
| 159 const cc::ScrollBoundaryBehavior& scroll_boundary_behavior) { |
| 159 ui::DidOverscrollParams params; | 160 ui::DidOverscrollParams params; |
| 160 params.accumulated_overscroll = accumulated_overscroll; | 161 params.accumulated_overscroll = accumulated_overscroll; |
| 161 params.latest_overscroll_delta = latest_overscroll_delta; | 162 params.latest_overscroll_delta = latest_overscroll_delta; |
| 162 params.current_fling_velocity = current_fling_velocity; | 163 params.current_fling_velocity = current_fling_velocity; |
| 163 params.causal_event_viewport_point = causal_event_viewport_point; | 164 params.causal_event_viewport_point = causal_event_viewport_point; |
| 165 params.scroll_boundary_behavior = scroll_boundary_behavior; |
| 164 if (legacy_host_message_sender_) { | 166 if (legacy_host_message_sender_) { |
| 165 legacy_host_message_sender_->Send(new InputHostMsg_DidOverscroll( | 167 legacy_host_message_sender_->Send(new InputHostMsg_DidOverscroll( |
| 166 legacy_host_message_routing_id_, params)); | 168 legacy_host_message_routing_id_, params)); |
| 167 } | 169 } |
| 168 } | 170 } |
| 169 | 171 |
| 170 void WidgetInputHandlerManager::DidStopFlinging() { | 172 void WidgetInputHandlerManager::DidStopFlinging() { |
| 171 if (legacy_host_message_sender_) { | 173 if (legacy_host_message_sender_) { |
| 172 legacy_host_message_sender_->Send( | 174 legacy_host_message_sender_->Send( |
| 173 new InputHostMsg_DidStopFlinging(legacy_host_message_routing_id_)); | 175 new InputHostMsg_DidStopFlinging(legacy_host_message_routing_id_)); |
| (...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 346 | 348 |
| 347 void WidgetInputHandlerManager::ObserveGestureEventOnCompositorThread( | 349 void WidgetInputHandlerManager::ObserveGestureEventOnCompositorThread( |
| 348 const blink::WebGestureEvent& gesture_event, | 350 const blink::WebGestureEvent& gesture_event, |
| 349 const cc::InputHandlerScrollResult& scroll_result) { | 351 const cc::InputHandlerScrollResult& scroll_result) { |
| 350 DCHECK(input_handler_proxy_->scroll_elasticity_controller()); | 352 DCHECK(input_handler_proxy_->scroll_elasticity_controller()); |
| 351 input_handler_proxy_->scroll_elasticity_controller() | 353 input_handler_proxy_->scroll_elasticity_controller() |
| 352 ->ObserveGestureEventAndResult(gesture_event, scroll_result); | 354 ->ObserveGestureEventAndResult(gesture_event, scroll_result); |
| 353 } | 355 } |
| 354 | 356 |
| 355 } // namespace content | 357 } // namespace content |
| OLD | NEW |