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

Side by Side Diff: content/browser/renderer_host/input/touch_event_queue.h

Issue 788923002: Touch Events - changedTouches list includes non-changed touch points on Android (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 5 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
« no previous file with comments | « no previous file | content/browser/renderer_host/input/touch_event_queue.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 CONTENT_BROWSER_RENDERER_HOST_INPUT_TOUCH_EVENT_QUEUE_H_ 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_INPUT_TOUCH_EVENT_QUEUE_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_INPUT_TOUCH_EVENT_QUEUE_H_ 6 #define CONTENT_BROWSER_RENDERER_HOST_INPUT_TOUCH_EVENT_QUEUE_H_
7 7
8 #include <deque> 8 #include <deque>
9 #include <map> 9 #include <map>
10 10
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 157
158 // Ack all coalesced events in |acked_event| to the client with |ack_result|, 158 // Ack all coalesced events in |acked_event| to the client with |ack_result|,
159 // updating the acked events with |optional_latency_info| if it exists. 159 // updating the acked events with |optional_latency_info| if it exists.
160 void AckTouchEventToClient(InputEventAckState ack_result, 160 void AckTouchEventToClient(InputEventAckState ack_result,
161 scoped_ptr<CoalescedWebTouchEvent> acked_event, 161 scoped_ptr<CoalescedWebTouchEvent> acked_event,
162 const ui::LatencyInfo* optional_latency_info); 162 const ui::LatencyInfo* optional_latency_info);
163 163
164 // Safely pop the head of the queue. 164 // Safely pop the head of the queue.
165 scoped_ptr<CoalescedWebTouchEvent> PopTouchEvent(); 165 scoped_ptr<CoalescedWebTouchEvent> PopTouchEvent();
166 166
167 // Dispatch |touch| to the client. 167 // Dispatch |touch| to the client. Before dispatching, updates pointer
168 void SendTouchEventImmediately(const TouchEventWithLatencyInfo& touch); 168 // states in touchmove events for pointers that have not changed position.
169 void SendTouchEventImmediately(TouchEventWithLatencyInfo* touch);
169 170
170 enum PreFilterResult { 171 enum PreFilterResult {
171 ACK_WITH_NO_CONSUMER_EXISTS, 172 ACK_WITH_NO_CONSUMER_EXISTS,
172 ACK_WITH_NOT_CONSUMED, 173 ACK_WITH_NOT_CONSUMED,
173 FORWARD_TO_RENDERER, 174 FORWARD_TO_RENDERER,
174 }; 175 };
175 // Filter touches prior to forwarding to the renderer, e.g., if the renderer 176 // Filter touches prior to forwarding to the renderer, e.g., if the renderer
176 // has no touch handler. 177 // has no touch handler.
177 PreFilterResult FilterBeforeForwarding(const blink::WebTouchEvent& event); 178 PreFilterResult FilterBeforeForwarding(const blink::WebTouchEvent& event);
178 void ForwardToRenderer(const TouchEventWithLatencyInfo& event); 179 void ForwardToRenderer(const TouchEventWithLatencyInfo& event);
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
229 // For details see the design doc at http://goo.gl/lVyJAa. 230 // For details see the design doc at http://goo.gl/lVyJAa.
230 bool send_touch_events_async_; 231 bool send_touch_events_async_;
231 scoped_ptr<TouchEventWithLatencyInfo> pending_async_touchmove_; 232 scoped_ptr<TouchEventWithLatencyInfo> pending_async_touchmove_;
232 double last_sent_touch_timestamp_sec_; 233 double last_sent_touch_timestamp_sec_;
233 234
234 // How touch events are handled during scrolling. For now this is a global 235 // How touch events are handled during scrolling. For now this is a global
235 // setting for experimentation, but we may evolve it into an app-controlled 236 // setting for experimentation, but we may evolve it into an app-controlled
236 // mode. 237 // mode.
237 const TouchScrollingMode touch_scrolling_mode_; 238 const TouchScrollingMode touch_scrolling_mode_;
238 239
240 // Event is saved to compare pointer positions for new touchmove events.
241 scoped_ptr<blink::WebTouchEvent> last_sent_touchevent_;
242
239 DISALLOW_COPY_AND_ASSIGN(TouchEventQueue); 243 DISALLOW_COPY_AND_ASSIGN(TouchEventQueue);
240 }; 244 };
241 245
242 } // namespace content 246 } // namespace content
243 247
244 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_TOUCH_EVENT_QUEUE_H_ 248 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_TOUCH_EVENT_QUEUE_H_
OLDNEW
« no previous file with comments | « no previous file | content/browser/renderer_host/input/touch_event_queue.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698