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 "content/renderer/input/input_handler_wrapper.h" | 5 #include "content/renderer/input/input_handler_wrapper.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/location.h" | 8 #include "base/location.h" |
9 #include "content/public/common/content_features.h" | 9 #include "content/public/common/content_features.h" |
10 #include "content/public/common/content_switches.h" | 10 #include "content/public/common/content_switches.h" |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 const blink::WebFloatPoint& velocity, | 67 const blink::WebFloatPoint& velocity, |
68 const blink::WebSize& cumulative_scroll) { | 68 const blink::WebSize& cumulative_scroll) { |
69 return blink::Platform::Current()->CreateFlingAnimationCurve( | 69 return blink::Platform::Current()->CreateFlingAnimationCurve( |
70 deviceSource, velocity, cumulative_scroll); | 70 deviceSource, velocity, cumulative_scroll); |
71 } | 71 } |
72 | 72 |
73 void InputHandlerWrapper::DidOverscroll( | 73 void InputHandlerWrapper::DidOverscroll( |
74 const gfx::Vector2dF& accumulated_overscroll, | 74 const gfx::Vector2dF& accumulated_overscroll, |
75 const gfx::Vector2dF& latest_overscroll_delta, | 75 const gfx::Vector2dF& latest_overscroll_delta, |
76 const gfx::Vector2dF& current_fling_velocity, | 76 const gfx::Vector2dF& current_fling_velocity, |
77 const gfx::PointF& causal_event_viewport_point) { | 77 const gfx::PointF& causal_event_viewport_point, |
| 78 const cc::ScrollBoundaryBehavior& scroll_boundary_behavior) { |
78 ui::DidOverscrollParams params; | 79 ui::DidOverscrollParams params; |
79 params.accumulated_overscroll = accumulated_overscroll; | 80 params.accumulated_overscroll = accumulated_overscroll; |
80 params.latest_overscroll_delta = latest_overscroll_delta; | 81 params.latest_overscroll_delta = latest_overscroll_delta; |
81 params.current_fling_velocity = current_fling_velocity; | 82 params.current_fling_velocity = current_fling_velocity; |
82 params.causal_event_viewport_point = causal_event_viewport_point; | 83 params.causal_event_viewport_point = causal_event_viewport_point; |
| 84 params.scroll_boundary_behavior = scroll_boundary_behavior; |
83 input_handler_manager_->DidOverscroll(routing_id_, params); | 85 input_handler_manager_->DidOverscroll(routing_id_, params); |
84 } | 86 } |
85 | 87 |
86 void InputHandlerWrapper::DidStopFlinging() { | 88 void InputHandlerWrapper::DidStopFlinging() { |
87 input_handler_manager_->DidStopFlinging(routing_id_); | 89 input_handler_manager_->DidStopFlinging(routing_id_); |
88 } | 90 } |
89 | 91 |
90 void InputHandlerWrapper::DidAnimateForInput() { | 92 void InputHandlerWrapper::DidAnimateForInput() { |
91 input_handler_manager_->DidAnimateForInput(); | 93 input_handler_manager_->DidAnimateForInput(); |
92 } | 94 } |
(...skipping 10 matching lines...) Expand all Loading... |
103 scroll_begin.data.scroll_begin.delta_y_hint = | 105 scroll_begin.data.scroll_begin.delta_y_hint = |
104 update_event.data.scroll_update.delta_y; | 106 update_event.data.scroll_update.delta_y; |
105 scroll_begin.data.scroll_begin.delta_hint_units = | 107 scroll_begin.data.scroll_begin.delta_hint_units = |
106 update_event.data.scroll_update.delta_units; | 108 update_event.data.scroll_update.delta_units; |
107 | 109 |
108 DispatchNonBlockingEventToMainThread( | 110 DispatchNonBlockingEventToMainThread( |
109 ui::WebInputEventTraits::Clone(scroll_begin), ui::LatencyInfo()); | 111 ui::WebInputEventTraits::Clone(scroll_begin), ui::LatencyInfo()); |
110 } | 112 } |
111 | 113 |
112 } // namespace content | 114 } // namespace content |
OLD | NEW |