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 <memory> | 8 #include <memory> |
9 | 9 |
10 #include "base/containers/hash_tables.h" | 10 #include "base/containers/hash_tables.h" |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 const gfx::Point& anchor) override; | 85 const gfx::Point& anchor) override; |
86 | 86 |
87 // blink::WebGestureCurveTarget implementation. | 87 // blink::WebGestureCurveTarget implementation. |
88 bool scrollBy(const blink::WebFloatSize& offset, | 88 bool scrollBy(const blink::WebFloatSize& offset, |
89 const blink::WebFloatSize& velocity) override; | 89 const blink::WebFloatSize& velocity) override; |
90 | 90 |
91 bool gesture_scroll_on_impl_thread_for_testing() const { | 91 bool gesture_scroll_on_impl_thread_for_testing() const { |
92 return gesture_scroll_on_impl_thread_; | 92 return gesture_scroll_on_impl_thread_; |
93 } | 93 } |
94 | 94 |
| 95 bool isFlinging() const { |
| 96 return (!!fling_curve_) || fling_may_be_active_on_main_thread_; |
| 97 } |
| 98 |
95 protected: | 99 protected: |
96 void RecordMainThreadScrollingReasons(blink::WebInputEvent::Type type, | 100 void RecordMainThreadScrollingReasons(blink::WebInputEvent::Type type, |
97 uint32_t reasons); | 101 uint32_t reasons); |
98 | 102 |
99 private: | 103 private: |
100 friend class test::InputHandlerProxyTest; | 104 friend class test::InputHandlerProxyTest; |
101 | 105 |
102 // Helper functions for handling more complicated input events. | 106 // Helper functions for handling more complicated input events. |
103 EventDisposition HandleMouseWheel( | 107 EventDisposition HandleMouseWheel( |
104 const blink::WebMouseWheelEvent& event); | 108 const blink::WebMouseWheelEvent& event); |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
212 int32_t touch_start_result_; | 216 int32_t touch_start_result_; |
213 | 217 |
214 base::TimeTicks last_fling_animate_time_; | 218 base::TimeTicks last_fling_animate_time_; |
215 | 219 |
216 DISALLOW_COPY_AND_ASSIGN(InputHandlerProxy); | 220 DISALLOW_COPY_AND_ASSIGN(InputHandlerProxy); |
217 }; | 221 }; |
218 | 222 |
219 } // namespace ui | 223 } // namespace ui |
220 | 224 |
221 #endif // UI_EVENTS_BLINK_INPUT_HANDLER_PROXY_H_ | 225 #endif // UI_EVENTS_BLINK_INPUT_HANDLER_PROXY_H_ |
OLD | NEW |