| 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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 | 53 |
| 54 enum EventDisposition { | 54 enum EventDisposition { |
| 55 DID_HANDLE, | 55 DID_HANDLE, |
| 56 DID_NOT_HANDLE, | 56 DID_NOT_HANDLE, |
| 57 DID_HANDLE_NON_BLOCKING, | 57 DID_HANDLE_NON_BLOCKING, |
| 58 DROP_EVENT | 58 DROP_EVENT |
| 59 }; | 59 }; |
| 60 EventDisposition HandleInputEventWithLatencyInfo( | 60 EventDisposition HandleInputEventWithLatencyInfo( |
| 61 const blink::WebInputEvent& event, | 61 const blink::WebInputEvent& event, |
| 62 ui::LatencyInfo* latency_info); | 62 ui::LatencyInfo* latency_info); |
| 63 EventDisposition HandleInputEvent(const blink::WebInputEvent& event); | 63 EventDisposition HandleInputEvent( |
| 64 const blink::WebInputEvent& event, |
| 65 ui::LatencyInfo* latency_info = nullptr); |
| 64 | 66 |
| 65 // cc::InputHandlerClient implementation. | 67 // cc::InputHandlerClient implementation. |
| 66 void WillShutdown() override; | 68 void WillShutdown() override; |
| 67 void Animate(base::TimeTicks time) override; | 69 void Animate(base::TimeTicks time) override; |
| 68 void MainThreadHasStoppedFlinging() override; | 70 void MainThreadHasStoppedFlinging() override; |
| 69 void ReconcileElasticOverscrollAndRootScroll() override; | 71 void ReconcileElasticOverscrollAndRootScroll() override; |
| 70 void UpdateRootLayerStateForSynchronousInputHandler( | 72 void UpdateRootLayerStateForSynchronousInputHandler( |
| 71 const gfx::ScrollOffset& total_scroll_offset, | 73 const gfx::ScrollOffset& total_scroll_offset, |
| 72 const gfx::ScrollOffset& max_scroll_offset, | 74 const gfx::ScrollOffset& max_scroll_offset, |
| 73 const gfx::SizeF& scrollable_size, | 75 const gfx::SizeF& scrollable_size, |
| (...skipping 25 matching lines...) Expand all Loading... |
| 99 private: | 101 private: |
| 100 friend class test::InputHandlerProxyTest; | 102 friend class test::InputHandlerProxyTest; |
| 101 | 103 |
| 102 // Helper functions for handling more complicated input events. | 104 // Helper functions for handling more complicated input events. |
| 103 EventDisposition HandleMouseWheel( | 105 EventDisposition HandleMouseWheel( |
| 104 const blink::WebMouseWheelEvent& event); | 106 const blink::WebMouseWheelEvent& event); |
| 105 EventDisposition ScrollByMouseWheel(const blink::WebMouseWheelEvent& event); | 107 EventDisposition ScrollByMouseWheel(const blink::WebMouseWheelEvent& event); |
| 106 EventDisposition HandleGestureScrollBegin( | 108 EventDisposition HandleGestureScrollBegin( |
| 107 const blink::WebGestureEvent& event); | 109 const blink::WebGestureEvent& event); |
| 108 EventDisposition HandleGestureScrollUpdate( | 110 EventDisposition HandleGestureScrollUpdate( |
| 109 const blink::WebGestureEvent& event); | 111 const blink::WebGestureEvent& event, ui::LatencyInfo* latency_info); |
| 110 EventDisposition HandleGestureScrollEnd( | 112 EventDisposition HandleGestureScrollEnd( |
| 111 const blink::WebGestureEvent& event); | 113 const blink::WebGestureEvent& event); |
| 112 EventDisposition HandleGestureFlingStart( | 114 EventDisposition HandleGestureFlingStart( |
| 113 const blink::WebGestureEvent& event); | 115 const blink::WebGestureEvent& event); |
| 114 EventDisposition HandleTouchStart(const blink::WebTouchEvent& event); | 116 EventDisposition HandleTouchStart(const blink::WebTouchEvent& event); |
| 115 EventDisposition HandleTouchMove(const blink::WebTouchEvent& event); | 117 EventDisposition HandleTouchMove(const blink::WebTouchEvent& event); |
| 116 EventDisposition HandleTouchEnd(const blink::WebTouchEvent& event); | 118 EventDisposition HandleTouchEnd(const blink::WebTouchEvent& event); |
| 117 | 119 |
| 118 // Returns true if the event should be suppressed due to to an active, | 120 // Returns true if the event should be suppressed due to to an active, |
| 119 // boost-enabled fling, in which case further processing should cease. | 121 // boost-enabled fling, in which case further processing should cease. |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 212 int32_t touch_start_result_; | 214 int32_t touch_start_result_; |
| 213 | 215 |
| 214 base::TimeTicks last_fling_animate_time_; | 216 base::TimeTicks last_fling_animate_time_; |
| 215 | 217 |
| 216 DISALLOW_COPY_AND_ASSIGN(InputHandlerProxy); | 218 DISALLOW_COPY_AND_ASSIGN(InputHandlerProxy); |
| 217 }; | 219 }; |
| 218 | 220 |
| 219 } // namespace ui | 221 } // namespace ui |
| 220 | 222 |
| 221 #endif // UI_EVENTS_BLINK_INPUT_HANDLER_PROXY_H_ | 223 #endif // UI_EVENTS_BLINK_INPUT_HANDLER_PROXY_H_ |
| OLD | NEW |