| 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 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 bool scrollBy(const blink::WebFloatSize& offset, | 111 bool scrollBy(const blink::WebFloatSize& offset, |
| 112 const blink::WebFloatSize& velocity) override; | 112 const blink::WebFloatSize& velocity) override; |
| 113 | 113 |
| 114 bool gesture_scroll_on_impl_thread_for_testing() const { | 114 bool gesture_scroll_on_impl_thread_for_testing() const { |
| 115 return gesture_scroll_on_impl_thread_; | 115 return gesture_scroll_on_impl_thread_; |
| 116 } | 116 } |
| 117 | 117 |
| 118 protected: | 118 protected: |
| 119 void RecordMainThreadScrollingReasons(blink::WebGestureDevice device, | 119 void RecordMainThreadScrollingReasons(blink::WebGestureDevice device, |
| 120 uint32_t reasons); | 120 uint32_t reasons); |
| 121 void RecordScrollingThreadStatus(blink::WebGestureDevice device, | |
| 122 uint32_t reasons); | |
| 123 | 121 |
| 124 private: | 122 private: |
| 125 friend class test::InputHandlerProxyTest; | 123 friend class test::InputHandlerProxyTest; |
| 126 friend class test::InputHandlerProxyEventQueueTest; | 124 friend class test::InputHandlerProxyEventQueueTest; |
| 127 | 125 |
| 128 void DispatchSingleInputEvent(std::unique_ptr<EventWithCallback>, | 126 void DispatchSingleInputEvent(std::unique_ptr<EventWithCallback>, |
| 129 const base::TimeTicks); | 127 const base::TimeTicks); |
| 130 void DispatchQueuedInputEvents(); | 128 void DispatchQueuedInputEvents(); |
| 131 | 129 |
| 132 // Helper functions for handling more complicated input events. | 130 // Helper functions for handling more complicated input events. |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 240 | 238 |
| 241 bool smooth_scroll_enabled_; | 239 bool smooth_scroll_enabled_; |
| 242 bool uma_latency_reporting_enabled_; | 240 bool uma_latency_reporting_enabled_; |
| 243 bool touchpad_and_wheel_scroll_latching_enabled_; | 241 bool touchpad_and_wheel_scroll_latching_enabled_; |
| 244 | 242 |
| 245 // The merged result of the last touch start with previous touch starts. | 243 // The merged result of the last touch start with previous touch starts. |
| 246 // This value will get returned for subsequent TouchMove events to allow | 244 // This value will get returned for subsequent TouchMove events to allow |
| 247 // passive events not to block scrolling. | 245 // passive events not to block scrolling. |
| 248 int32_t touch_start_result_; | 246 int32_t touch_start_result_; |
| 249 | 247 |
| 250 // The result of the last mouse wheel event. This value is used to determine | |
| 251 // whether the next wheel scroll is blocked on the Main thread or not. | |
| 252 int32_t mouse_wheel_result_; | |
| 253 | |
| 254 base::TimeTicks last_fling_animate_time_; | 248 base::TimeTicks last_fling_animate_time_; |
| 255 | 249 |
| 256 // Used to record overscroll notifications while an event is being | 250 // Used to record overscroll notifications while an event is being |
| 257 // dispatched. If the event causes overscroll, the overscroll metadata can be | 251 // dispatched. If the event causes overscroll, the overscroll metadata can be |
| 258 // bundled in the event ack, saving an IPC. Note that we must continue | 252 // bundled in the event ack, saving an IPC. Note that we must continue |
| 259 // supporting overscroll IPC notifications due to fling animation updates. | 253 // supporting overscroll IPC notifications due to fling animation updates. |
| 260 std::unique_ptr<DidOverscrollParams> current_overscroll_params_; | 254 std::unique_ptr<DidOverscrollParams> current_overscroll_params_; |
| 261 | 255 |
| 262 std::unique_ptr<CompositorThreadEventQueue> compositor_event_queue_; | 256 std::unique_ptr<CompositorThreadEventQueue> compositor_event_queue_; |
| 263 bool has_ongoing_compositor_scroll_pinch_; | 257 bool has_ongoing_compositor_scroll_pinch_; |
| 264 | 258 |
| 265 std::unique_ptr<base::TickClock> tick_clock_; | 259 std::unique_ptr<base::TickClock> tick_clock_; |
| 266 | 260 |
| 267 DISALLOW_COPY_AND_ASSIGN(InputHandlerProxy); | 261 DISALLOW_COPY_AND_ASSIGN(InputHandlerProxy); |
| 268 }; | 262 }; |
| 269 | 263 |
| 270 } // namespace ui | 264 } // namespace ui |
| 271 | 265 |
| 272 #endif // UI_EVENTS_BLINK_INPUT_HANDLER_PROXY_H_ | 266 #endif // UI_EVENTS_BLINK_INPUT_HANDLER_PROXY_H_ |
| OLD | NEW |