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

Side by Side Diff: content/browser/renderer_host/render_widget_host_input_event_router.h

Issue 2928793003: Re-target wheel events only when a new scroll sequence has started. (Closed)
Patch Set: review comments addressed. Created 3 years, 6 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_INPUT_EVENT_ROUTER_H_ 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_INPUT_EVENT_ROUTER_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_INPUT_EVENT_ROUTER_H_ 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_INPUT_EVENT_ROUTER_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <deque> 10 #include <deque>
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 void SendGestureScrollEnd(RenderWidgetHostViewBase* view, 157 void SendGestureScrollEnd(RenderWidgetHostViewBase* view,
158 const blink::WebGestureEvent& event); 158 const blink::WebGestureEvent& event);
159 159
160 FrameSinkIdOwnerMap owner_map_; 160 FrameSinkIdOwnerMap owner_map_;
161 TargetQueue touchscreen_gesture_target_queue_; 161 TargetQueue touchscreen_gesture_target_queue_;
162 TargetData touch_target_; 162 TargetData touch_target_;
163 TargetData touchscreen_gesture_target_; 163 TargetData touchscreen_gesture_target_;
164 TargetData touchpad_gesture_target_; 164 TargetData touchpad_gesture_target_;
165 TargetData bubbling_gesture_scroll_target_; 165 TargetData bubbling_gesture_scroll_target_;
166 TargetData first_bubbling_scroll_target_; 166 TargetData first_bubbling_scroll_target_;
167 // Used to target wheel events for the duration of a scroll when wheel scroll
168 // latching is enabled.
169 TargetData wheel_target_;
167 // Maintains the same target between mouse down and mouse up. 170 // Maintains the same target between mouse down and mouse up.
168 TargetData mouse_capture_target_; 171 TargetData mouse_capture_target_;
169 172
170 // Tracked for the purpose of generating MouseEnter and MouseLeave events. 173 // Tracked for the purpose of generating MouseEnter and MouseLeave events.
171 RenderWidgetHostViewBase* last_mouse_move_target_; 174 RenderWidgetHostViewBase* last_mouse_move_target_;
172 RenderWidgetHostViewBase* last_mouse_move_root_view_; 175 RenderWidgetHostViewBase* last_mouse_move_root_view_;
173 176
174 int active_touches_; 177 int active_touches_;
175 // Keep track of when we are between GesturePinchBegin and GesturePinchEnd 178 // Keep track of when we are between GesturePinchBegin and GesturePinchEnd
176 // inclusive, as we need to route these events (and anything in between) to 179 // inclusive, as we need to route these events (and anything in between) to
177 // the main frame. 180 // the main frame.
178 bool in_touchscreen_gesture_pinch_; 181 bool in_touchscreen_gesture_pinch_;
179 bool gesture_pinch_did_send_scroll_begin_; 182 bool gesture_pinch_did_send_scroll_begin_;
180 std::unordered_map<cc::SurfaceId, HittestData, cc::SurfaceIdHash> 183 std::unordered_map<cc::SurfaceId, HittestData, cc::SurfaceIdHash>
181 hittest_data_; 184 hittest_data_;
182 185
183 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostInputEventRouter); 186 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostInputEventRouter);
184 FRIEND_TEST_ALL_PREFIXES(SitePerProcessBrowserTest, 187 FRIEND_TEST_ALL_PREFIXES(SitePerProcessBrowserTest,
185 InputEventRouterGestureTargetQueueTest); 188 InputEventRouterGestureTargetQueueTest);
186 FRIEND_TEST_ALL_PREFIXES(SitePerProcessBrowserTest, 189 FRIEND_TEST_ALL_PREFIXES(SitePerProcessBrowserTest,
187 InputEventRouterTouchpadGestureTargetTest); 190 InputEventRouterTouchpadGestureTargetTest);
188 }; 191 };
189 192
190 } // namespace content 193 } // namespace content
191 194
192 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_INPUT_EVENT_ROUTER_H _ 195 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_INPUT_EVENT_ROUTER_H _
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698