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