OLD | NEW |
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 #include "content/browser/renderer_host/input/touch_event_queue.h" | 5 #include "content/browser/renderer_host/input/touch_event_queue.h" |
6 | 6 |
7 #include "base/auto_reset.h" | 7 #include "base/auto_reset.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/debug/trace_event.h" | 9 #include "base/debug/trace_event.h" |
10 #include "base/stl_util.h" | 10 #include "base/stl_util.h" |
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
325 TouchScrollingMode mode, | 325 TouchScrollingMode mode, |
326 double touchmove_suppression_length_dips) | 326 double touchmove_suppression_length_dips) |
327 : client_(client), | 327 : client_(client), |
328 dispatching_touch_ack_(NULL), | 328 dispatching_touch_ack_(NULL), |
329 dispatching_touch_(false), | 329 dispatching_touch_(false), |
330 touch_filtering_state_(TOUCH_FILTERING_STATE_DEFAULT), | 330 touch_filtering_state_(TOUCH_FILTERING_STATE_DEFAULT), |
331 ack_timeout_enabled_(false), | 331 ack_timeout_enabled_(false), |
332 touchmove_slop_suppressor_(new TouchMoveSlopSuppressor( | 332 touchmove_slop_suppressor_(new TouchMoveSlopSuppressor( |
333 touchmove_suppression_length_dips + kSlopEpsilon)), | 333 touchmove_suppression_length_dips + kSlopEpsilon)), |
334 send_touch_events_async_(false), | 334 send_touch_events_async_(false), |
| 335 needs_async_touch_move_for_outer_slop_region_(false), |
335 last_sent_touch_timestamp_sec_(0), | 336 last_sent_touch_timestamp_sec_(0), |
336 touch_scrolling_mode_(mode) { | 337 touch_scrolling_mode_(mode) { |
337 DCHECK(client); | 338 DCHECK(client); |
338 } | 339 } |
339 | 340 |
340 TouchEventQueue::~TouchEventQueue() { | 341 TouchEventQueue::~TouchEventQueue() { |
341 if (!touch_queue_.empty()) | 342 if (!touch_queue_.empty()) |
342 STLDeleteElements(&touch_queue_); | 343 STLDeleteElements(&touch_queue_); |
343 } | 344 } |
344 | 345 |
(...skipping 412 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
757 } else if (event.type == WebInputEvent::TouchStart) { | 758 } else if (event.type == WebInputEvent::TouchStart) { |
758 for (unsigned i = 0; i < event.touchesLength; ++i) { | 759 for (unsigned i = 0; i < event.touchesLength; ++i) { |
759 const WebTouchPoint& point = event.touches[i]; | 760 const WebTouchPoint& point = event.touches[i]; |
760 if (point.state == WebTouchPoint::StatePressed) | 761 if (point.state == WebTouchPoint::StatePressed) |
761 touch_ack_states_[point.id] = ack_result; | 762 touch_ack_states_[point.id] = ack_result; |
762 } | 763 } |
763 } | 764 } |
764 } | 765 } |
765 | 766 |
766 } // namespace content | 767 } // namespace content |
OLD | NEW |