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

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

Issue 1631963002: Plumb firing passive event listeners. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master_wheel_passive_listeners_2a
Patch Set: Set dependency correctly Created 4 years, 10 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
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 "base/containers/hash_tables.h" 8 #include "base/containers/hash_tables.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 28 matching lines...) Expand all
39 39
40 InputHandlerProxy(cc::InputHandler* input_handler, 40 InputHandlerProxy(cc::InputHandler* input_handler,
41 InputHandlerProxyClient* client); 41 InputHandlerProxyClient* client);
42 ~InputHandlerProxy() override; 42 ~InputHandlerProxy() override;
43 43
44 InputScrollElasticityController* scroll_elasticity_controller() { 44 InputScrollElasticityController* scroll_elasticity_controller() {
45 return scroll_elasticity_controller_.get(); 45 return scroll_elasticity_controller_.get();
46 } 46 }
47 47
48 void set_smooth_scroll_enabled(bool value) { smooth_scroll_enabled_ = value; } 48 void set_smooth_scroll_enabled(bool value) { smooth_scroll_enabled_ = value; }
49 void set_scroll_on_mouse_wheel(bool value) { scroll_on_mouse_wheel_ = value; }
49 50
50 enum EventDisposition { 51 enum EventDisposition {
51 DID_HANDLE, 52 DID_HANDLE,
52 DID_NOT_HANDLE, 53 DID_NOT_HANDLE,
54 NON_BLOCKING,
53 DROP_EVENT 55 DROP_EVENT
54 }; 56 };
55 EventDisposition HandleInputEventWithLatencyInfo( 57 EventDisposition HandleInputEventWithLatencyInfo(
56 const blink::WebInputEvent& event, 58 const blink::WebInputEvent& event,
57 ui::LatencyInfo* latency_info); 59 ui::LatencyInfo* latency_info);
58 EventDisposition HandleInputEvent(const blink::WebInputEvent& event); 60 EventDisposition HandleInputEvent(const blink::WebInputEvent& event);
59 61
60 // cc::InputHandlerClient implementation. 62 // cc::InputHandlerClient implementation.
61 void WillShutdown() override; 63 void WillShutdown() override;
62 void Animate(base::TimeTicks time) override; 64 void Animate(base::TimeTicks time) override;
(...skipping 29 matching lines...) Expand all
92 EventDisposition HandleMouseWheel( 94 EventDisposition HandleMouseWheel(
93 const blink::WebMouseWheelEvent& event); 95 const blink::WebMouseWheelEvent& event);
94 EventDisposition HandleGestureScrollBegin( 96 EventDisposition HandleGestureScrollBegin(
95 const blink::WebGestureEvent& event); 97 const blink::WebGestureEvent& event);
96 EventDisposition HandleGestureScrollUpdate( 98 EventDisposition HandleGestureScrollUpdate(
97 const blink::WebGestureEvent& event); 99 const blink::WebGestureEvent& event);
98 EventDisposition HandleGestureScrollEnd( 100 EventDisposition HandleGestureScrollEnd(
99 const blink::WebGestureEvent& event); 101 const blink::WebGestureEvent& event);
100 EventDisposition HandleGestureFlingStart( 102 EventDisposition HandleGestureFlingStart(
101 const blink::WebGestureEvent& event); 103 const blink::WebGestureEvent& event);
102 EventDisposition HandleTouchStart( 104 EventDisposition HandleTouchStart(const blink::WebTouchEvent& event);
103 const blink::WebTouchEvent& event); 105 EventDisposition HandleTouchMove(const blink::WebTouchEvent& event);
104 106
105 // Returns true if the event should be suppressed due to to an active, 107 // Returns true if the event should be suppressed due to to an active,
106 // boost-enabled fling, in which case further processing should cease. 108 // boost-enabled fling, in which case further processing should cease.
107 bool FilterInputEventForFlingBoosting(const blink::WebInputEvent& event); 109 bool FilterInputEventForFlingBoosting(const blink::WebInputEvent& event);
108 110
109 // Schedule a time in the future after which a boost-enabled fling will 111 // Schedule a time in the future after which a boost-enabled fling will
110 // terminate without further momentum from the user (see |Animate()|). 112 // terminate without further momentum from the user (see |Animate()|).
111 void ExtendBoostedFlingTimeout(const blink::WebGestureEvent& event); 113 void ExtendBoostedFlingTimeout(const blink::WebGestureEvent& event);
112 114
113 // Returns true if we scrolled by the increment. 115 // Returns true if we scrolled by the increment.
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 // Non-zero only within the scope of |scrollBy|. 182 // Non-zero only within the scope of |scrollBy|.
181 gfx::Vector2dF current_fling_velocity_; 183 gfx::Vector2dF current_fling_velocity_;
182 184
183 // Used to animate rubber-band over-scroll effect on Mac. 185 // Used to animate rubber-band over-scroll effect on Mac.
184 scoped_ptr<InputScrollElasticityController> scroll_elasticity_controller_; 186 scoped_ptr<InputScrollElasticityController> scroll_elasticity_controller_;
185 187
186 bool smooth_scroll_enabled_; 188 bool smooth_scroll_enabled_;
187 189
188 bool uma_latency_reporting_enabled_; 190 bool uma_latency_reporting_enabled_;
189 191
192 bool scroll_on_mouse_wheel_;
tdresser 2016/01/26 16:34:37 I'm not a big fan of the naming here, and I'm not
dtapuska 2016/01/26 16:53:15 I didn't care for the name either. Effective it me
tdresser 2016/01/26 18:45:42 Something like "wheel_gestures_enabled_"?
193
190 base::TimeTicks last_fling_animate_time_; 194 base::TimeTicks last_fling_animate_time_;
191 195
192 DISALLOW_COPY_AND_ASSIGN(InputHandlerProxy); 196 DISALLOW_COPY_AND_ASSIGN(InputHandlerProxy);
193 }; 197 };
194 198
195 } // namespace ui 199 } // namespace ui
196 200
197 #endif // UI_EVENTS_BLINK_INPUT_HANDLER_PROXY_H_ 201 #endif // UI_EVENTS_BLINK_INPUT_HANDLER_PROXY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698