Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(135)

Side by Side Diff: ui/events/blink/input_handler_proxy.h

Issue 2630603002: Revert of Touchpad and wheel scroll latching for ChromeOS behind flag. (Closed)
Patch Set: Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « content/renderer/input/input_handler_wrapper.cc ('k') | ui/events/blink/input_handler_proxy.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 55
56 InputHandlerProxy(cc::InputHandler* input_handler, 56 InputHandlerProxy(cc::InputHandler* input_handler,
57 InputHandlerProxyClient* client); 57 InputHandlerProxyClient* client);
58 ~InputHandlerProxy() override; 58 ~InputHandlerProxy() override;
59 59
60 InputScrollElasticityController* scroll_elasticity_controller() { 60 InputScrollElasticityController* scroll_elasticity_controller() {
61 return scroll_elasticity_controller_.get(); 61 return scroll_elasticity_controller_.get();
62 } 62 }
63 63
64 void set_smooth_scroll_enabled(bool value) { smooth_scroll_enabled_ = value; } 64 void set_smooth_scroll_enabled(bool value) { smooth_scroll_enabled_ = value; }
65 void set_touchpad_and_wheel_scroll_latching_enabled(bool value) {
66 touchpad_and_wheel_scroll_latching_enabled_ = value;
67 }
68 65
69 enum EventDisposition { 66 enum EventDisposition {
70 DID_HANDLE, 67 DID_HANDLE,
71 DID_NOT_HANDLE, 68 DID_NOT_HANDLE,
72 DID_NOT_HANDLE_NON_BLOCKING_DUE_TO_FLING, 69 DID_NOT_HANDLE_NON_BLOCKING_DUE_TO_FLING,
73 DID_HANDLE_NON_BLOCKING, 70 DID_HANDLE_NON_BLOCKING,
74 DROP_EVENT 71 DROP_EVENT
75 }; 72 };
76 using EventDispositionCallback = 73 using EventDispositionCallback =
77 base::Callback<void(EventDisposition, 74 base::Callback<void(EventDisposition,
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 friend class test::InputHandlerProxyTest; 120 friend class test::InputHandlerProxyTest;
124 friend class test::InputHandlerProxyEventQueueTest; 121 friend class test::InputHandlerProxyEventQueueTest;
125 122
126 void DispatchSingleInputEvent(std::unique_ptr<EventWithCallback>, 123 void DispatchSingleInputEvent(std::unique_ptr<EventWithCallback>,
127 const base::TimeTicks); 124 const base::TimeTicks);
128 void DispatchQueuedInputEvents(); 125 void DispatchQueuedInputEvents();
129 126
130 // Helper functions for handling more complicated input events. 127 // Helper functions for handling more complicated input events.
131 EventDisposition HandleMouseWheel( 128 EventDisposition HandleMouseWheel(
132 const blink::WebMouseWheelEvent& event); 129 const blink::WebMouseWheelEvent& event);
133 EventDisposition FlingScrollByMouseWheel( 130 EventDisposition ScrollByMouseWheel(
134 const blink::WebMouseWheelEvent& event, 131 const blink::WebMouseWheelEvent& event,
135 cc::EventListenerProperties listener_properties); 132 cc::EventListenerProperties listener_properties);
136 EventDisposition HandleGestureScrollBegin( 133 EventDisposition HandleGestureScrollBegin(
137 const blink::WebGestureEvent& event); 134 const blink::WebGestureEvent& event);
138 EventDisposition HandleGestureScrollUpdate( 135 EventDisposition HandleGestureScrollUpdate(
139 const blink::WebGestureEvent& event); 136 const blink::WebGestureEvent& event);
140 EventDisposition HandleGestureScrollEnd( 137 EventDisposition HandleGestureScrollEnd(
141 const blink::WebGestureEvent& event); 138 const blink::WebGestureEvent& event);
142 EventDisposition HandleGestureFlingStart( 139 EventDisposition HandleGestureFlingStart(
143 const blink::WebGestureEvent& event); 140 const blink::WebGestureEvent& event);
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 228
232 // Non-zero only within the scope of |scrollBy|. 229 // Non-zero only within the scope of |scrollBy|.
233 gfx::Vector2dF current_fling_velocity_; 230 gfx::Vector2dF current_fling_velocity_;
234 231
235 // Used to animate rubber-band over-scroll effect on Mac. 232 // Used to animate rubber-band over-scroll effect on Mac.
236 std::unique_ptr<InputScrollElasticityController> 233 std::unique_ptr<InputScrollElasticityController>
237 scroll_elasticity_controller_; 234 scroll_elasticity_controller_;
238 235
239 bool smooth_scroll_enabled_; 236 bool smooth_scroll_enabled_;
240 bool uma_latency_reporting_enabled_; 237 bool uma_latency_reporting_enabled_;
241 bool touchpad_and_wheel_scroll_latching_enabled_;
242 238
243 // The merged result of the last touch start with previous touch starts. 239 // The merged result of the last touch start with previous touch starts.
244 // This value will get returned for subsequent TouchMove events to allow 240 // This value will get returned for subsequent TouchMove events to allow
245 // passive events not to block scrolling. 241 // passive events not to block scrolling.
246 int32_t touch_start_result_; 242 int32_t touch_start_result_;
247 243
248 base::TimeTicks last_fling_animate_time_; 244 base::TimeTicks last_fling_animate_time_;
249 245
250 // Used to record overscroll notifications while an event is being 246 // Used to record overscroll notifications while an event is being
251 // dispatched. If the event causes overscroll, the overscroll metadata can be 247 // 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 248 // bundled in the event ack, saving an IPC. Note that we must continue
253 // supporting overscroll IPC notifications due to fling animation updates. 249 // supporting overscroll IPC notifications due to fling animation updates.
254 std::unique_ptr<DidOverscrollParams> current_overscroll_params_; 250 std::unique_ptr<DidOverscrollParams> current_overscroll_params_;
255 251
256 std::unique_ptr<CompositorThreadEventQueue> compositor_event_queue_; 252 std::unique_ptr<CompositorThreadEventQueue> compositor_event_queue_;
257 bool has_ongoing_compositor_scroll_pinch_; 253 bool has_ongoing_compositor_scroll_pinch_;
258 254
259 std::unique_ptr<base::TickClock> tick_clock_; 255 std::unique_ptr<base::TickClock> tick_clock_;
260 256
261 DISALLOW_COPY_AND_ASSIGN(InputHandlerProxy); 257 DISALLOW_COPY_AND_ASSIGN(InputHandlerProxy);
262 }; 258 };
263 259
264 } // namespace ui 260 } // namespace ui
265 261
266 #endif // UI_EVENTS_BLINK_INPUT_HANDLER_PROXY_H_ 262 #endif // UI_EVENTS_BLINK_INPUT_HANDLER_PROXY_H_
OLDNEW
« no previous file with comments | « content/renderer/input/input_handler_wrapper.cc ('k') | ui/events/blink/input_handler_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698