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