| 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/debug/trace_event.h" | 8 #include "base/debug/trace_event.h" |
| 9 #include "base/stl_util.h" | 9 #include "base/stl_util.h" |
| 10 #include "content/browser/renderer_host/input/timeout_monitor.h" | 10 #include "content/browser/renderer_host/input/timeout_monitor.h" |
| (...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 367 touch_ack_timeout_delay(base::TimeDelta::FromMilliseconds(200)), | 367 touch_ack_timeout_delay(base::TimeDelta::FromMilliseconds(200)), |
| 368 touch_ack_timeout_supported(false) { | 368 touch_ack_timeout_supported(false) { |
| 369 } | 369 } |
| 370 | 370 |
| 371 TouchEventQueue::TouchEventQueue(TouchEventQueueClient* client, | 371 TouchEventQueue::TouchEventQueue(TouchEventQueueClient* client, |
| 372 const Config& config) | 372 const Config& config) |
| 373 : client_(client), | 373 : client_(client), |
| 374 dispatching_touch_ack_(NULL), | 374 dispatching_touch_ack_(NULL), |
| 375 dispatching_touch_(false), | 375 dispatching_touch_(false), |
| 376 has_handlers_(true), | 376 has_handlers_(true), |
| 377 drop_remaining_touches_in_sequence_(false), |
| 377 touchmove_slop_suppressor_(new TouchMoveSlopSuppressor( | 378 touchmove_slop_suppressor_(new TouchMoveSlopSuppressor( |
| 378 config.touchmove_slop_suppression_length_dips)), | 379 config.touchmove_slop_suppression_length_dips)), |
| 379 send_touch_events_async_(false), | 380 send_touch_events_async_(false), |
| 380 needs_async_touchmove_for_outer_slop_region_(false), | 381 needs_async_touchmove_for_outer_slop_region_(false), |
| 381 last_sent_touch_timestamp_sec_(0), | 382 last_sent_touch_timestamp_sec_(0), |
| 382 touch_scrolling_mode_(config.touch_scrolling_mode) { | 383 touch_scrolling_mode_(config.touch_scrolling_mode) { |
| 383 DCHECK(client); | 384 DCHECK(client); |
| 384 if (config.touch_ack_timeout_supported) { | 385 if (config.touch_ack_timeout_supported) { |
| 385 timeout_handler_.reset( | 386 timeout_handler_.reset( |
| 386 new TouchTimeoutHandler(this, config.touch_ack_timeout_delay)); | 387 new TouchTimeoutHandler(this, config.touch_ack_timeout_delay)); |
| (...skipping 388 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 775 if (ack_result != INPUT_EVENT_ACK_STATE_NO_CONSUMER_EXISTS) | 776 if (ack_result != INPUT_EVENT_ACK_STATE_NO_CONSUMER_EXISTS) |
| 776 touch_consumer_states_.mark_bit(point.id); | 777 touch_consumer_states_.mark_bit(point.id); |
| 777 else | 778 else |
| 778 touch_consumer_states_.clear_bit(point.id); | 779 touch_consumer_states_.clear_bit(point.id); |
| 779 } | 780 } |
| 780 } | 781 } |
| 781 } | 782 } |
| 782 } | 783 } |
| 783 | 784 |
| 784 } // namespace content | 785 } // namespace content |
| OLD | NEW |