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

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: Relaxed touches state condition for TouchMove events for now Created 5 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 | « 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 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 161
162 // Ack all coalesced events in |acked_event| to the client with |ack_result|, 162 // Ack all coalesced events in |acked_event| to the client with |ack_result|,
163 // updating the acked events with |optional_latency_info| if it exists. 163 // updating the acked events with |optional_latency_info| if it exists.
164 void AckTouchEventToClient(InputEventAckState ack_result, 164 void AckTouchEventToClient(InputEventAckState ack_result,
165 scoped_ptr<CoalescedWebTouchEvent> acked_event, 165 scoped_ptr<CoalescedWebTouchEvent> acked_event,
166 const ui::LatencyInfo* optional_latency_info); 166 const ui::LatencyInfo* optional_latency_info);
167 167
168 // Safely pop the head of the queue. 168 // Safely pop the head of the queue.
169 scoped_ptr<CoalescedWebTouchEvent> PopTouchEvent(); 169 scoped_ptr<CoalescedWebTouchEvent> PopTouchEvent();
170 170
171 // Dispatch |touch| to the client. 171 // Dispatch |touch| to the client. Before dispatching, updates touches state
jdduke (slow) 2015/01/14 16:04:33 Perhaps "...updates pointer states in touchmove ev
USE s.singapati at gmail.com 2015/01/16 14:14:28 Done.
172 void SendTouchEventImmediately(const TouchEventWithLatencyInfo& touch); 172 // in touchmove event if touch position has not been changed
173 void SendTouchEventImmediately(TouchEventWithLatencyInfo* touch);
173 174
174 enum PreFilterResult { 175 enum PreFilterResult {
175 ACK_WITH_NO_CONSUMER_EXISTS, 176 ACK_WITH_NO_CONSUMER_EXISTS,
176 ACK_WITH_NOT_CONSUMED, 177 ACK_WITH_NOT_CONSUMED,
177 FORWARD_TO_RENDERER, 178 FORWARD_TO_RENDERER,
178 }; 179 };
179 // Filter touches prior to forwarding to the renderer, e.g., if the renderer 180 // Filter touches prior to forwarding to the renderer, e.g., if the renderer
180 // has no touch handler. 181 // has no touch handler.
181 PreFilterResult FilterBeforeForwarding(const blink::WebTouchEvent& event); 182 PreFilterResult FilterBeforeForwarding(const blink::WebTouchEvent& event);
182 void ForwardToRenderer(const TouchEventWithLatencyInfo& event); 183 void ForwardToRenderer(const TouchEventWithLatencyInfo& event);
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
234 bool send_touch_events_async_; 235 bool send_touch_events_async_;
235 bool needs_async_touchmove_for_outer_slop_region_; 236 bool needs_async_touchmove_for_outer_slop_region_;
236 scoped_ptr<TouchEventWithLatencyInfo> pending_async_touchmove_; 237 scoped_ptr<TouchEventWithLatencyInfo> pending_async_touchmove_;
237 double last_sent_touch_timestamp_sec_; 238 double last_sent_touch_timestamp_sec_;
238 239
239 // How touch events are handled during scrolling. For now this is a global 240 // How touch events are handled during scrolling. For now this is a global
240 // setting for experimentation, but we may evolve it into an app-controlled 241 // setting for experimentation, but we may evolve it into an app-controlled
241 // mode. 242 // mode.
242 const TouchScrollingMode touch_scrolling_mode_; 243 const TouchScrollingMode touch_scrolling_mode_;
243 244
245 // Touch event is saved to compare touches position in next TouchMove event
jdduke (slow) 2015/01/14 16:04:33 Maybe "... to compare pointer positions for new to
USE s.singapati at gmail.com 2015/01/16 14:14:28 Done.
246 scoped_ptr<blink::WebTouchEvent> last_sent_touchevent_;
247
244 DISALLOW_COPY_AND_ASSIGN(TouchEventQueue); 248 DISALLOW_COPY_AND_ASSIGN(TouchEventQueue);
245 }; 249 };
246 250
247 } // namespace content 251 } // namespace content
248 252
249 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_TOUCH_EVENT_QUEUE_H_ 253 #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