Chromium Code Reviews| 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 #ifndef UI_EVENTS_BLINK_INPUT_HANDLER_PROXY_H_ | 5 #ifndef UI_EVENTS_BLINK_INPUT_HANDLER_PROXY_H_ |
| 6 #define UI_EVENTS_BLINK_INPUT_HANDLER_PROXY_H_ | 6 #define UI_EVENTS_BLINK_INPUT_HANDLER_PROXY_H_ |
| 7 | 7 |
| 8 #include "base/containers/hash_tables.h" | 8 #include "base/containers/hash_tables.h" |
| 9 #include "base/macros.h" | 9 #include "base/macros.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 131 // Request a frame of animation from the InputHandler or | 131 // Request a frame of animation from the InputHandler or |
| 132 // SynchronousInputHandler. They can provide that by calling Animate(). | 132 // SynchronousInputHandler. They can provide that by calling Animate(). |
| 133 void RequestAnimation(); | 133 void RequestAnimation(); |
| 134 | 134 |
| 135 // Used to send overscroll messages to the browser. | 135 // Used to send overscroll messages to the browser. |
| 136 void HandleOverscroll( | 136 void HandleOverscroll( |
| 137 const gfx::Point& causal_event_viewport_point, | 137 const gfx::Point& causal_event_viewport_point, |
| 138 const cc::InputHandlerScrollResult& scroll_result); | 138 const cc::InputHandlerScrollResult& scroll_result); |
| 139 | 139 |
| 140 // Whether to use a smooth scroll animation for this event. | 140 // Whether to use a smooth scroll animation for this event. |
| 141 bool ShouldAnimate(const blink::WebMouseWheelEvent& event) const; | 141 bool ShouldAnimate(bool has_coarse_scroll_pixels) const; |
|
tdresser
2016/03/08 14:28:53
Can we pass has_precise_scroll_deltas? It would be
dtapuska
2016/03/08 20:31:49
done; although for the gesture case; it is a doubl
| |
| 142 | |
| 143 // Update the elastic overscroll controller with |gesture_event|. | |
| 144 void HandleScrollElasticityOverscroll( | |
| 145 const blink::WebGestureEvent& gesture_event, | |
| 146 const cc::InputHandlerScrollResult& scroll_result); | |
| 142 | 147 |
| 143 scoped_ptr<blink::WebGestureCurve> fling_curve_; | 148 scoped_ptr<blink::WebGestureCurve> fling_curve_; |
| 144 // Parameters for the active fling animation, stored in case we need to | 149 // Parameters for the active fling animation, stored in case we need to |
| 145 // transfer it out later. | 150 // transfer it out later. |
| 146 blink::WebActiveWheelFlingParameters fling_parameters_; | 151 blink::WebActiveWheelFlingParameters fling_parameters_; |
| 147 | 152 |
| 148 InputHandlerProxyClient* client_; | 153 InputHandlerProxyClient* client_; |
| 149 cc::InputHandler* input_handler_; | 154 cc::InputHandler* input_handler_; |
| 150 | 155 |
| 151 // Time at which an active fling should expire due to a deferred cancellation | 156 // Time at which an active fling should expire due to a deferred cancellation |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 199 int32_t touch_start_result_; | 204 int32_t touch_start_result_; |
| 200 | 205 |
| 201 base::TimeTicks last_fling_animate_time_; | 206 base::TimeTicks last_fling_animate_time_; |
| 202 | 207 |
| 203 DISALLOW_COPY_AND_ASSIGN(InputHandlerProxy); | 208 DISALLOW_COPY_AND_ASSIGN(InputHandlerProxy); |
| 204 }; | 209 }; |
| 205 | 210 |
| 206 } // namespace ui | 211 } // namespace ui |
| 207 | 212 |
| 208 #endif // UI_EVENTS_BLINK_INPUT_HANDLER_PROXY_H_ | 213 #endif // UI_EVENTS_BLINK_INPUT_HANDLER_PROXY_H_ |
| OLD | NEW |