| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/gesture_event_queue.h" | 5 #include "content/browser/renderer_host/input/gesture_event_queue.h" |
| 6 | 6 |
| 7 #include "base/trace_event/trace_event.h" | 7 #include "base/trace_event/trace_event.h" |
| 8 #include "content/browser/renderer_host/input/touchpad_tap_suppression_controlle
r.h" | 8 #include "content/browser/renderer_host/input/touchpad_tap_suppression_controlle
r.h" |
| 9 #include "content/browser/renderer_host/input/touchscreen_tap_suppression_contro
ller.h" | 9 #include "content/browser/renderer_host/input/touchscreen_tap_suppression_contro
ller.h" |
| 10 | 10 |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 118 debounce_interval_, | 118 debounce_interval_, |
| 119 this, | 119 this, |
| 120 &GestureEventQueue::SendScrollEndingEventsNow); | 120 &GestureEventQueue::SendScrollEndingEventsNow); |
| 121 } else { | 121 } else { |
| 122 // Extend the bounce interval. | 122 // Extend the bounce interval. |
| 123 debounce_deferring_timer_.Reset(); | 123 debounce_deferring_timer_.Reset(); |
| 124 } | 124 } |
| 125 scrolling_in_progress_ = true; | 125 scrolling_in_progress_ = true; |
| 126 debouncing_deferral_queue_.clear(); | 126 debouncing_deferral_queue_.clear(); |
| 127 return true; | 127 return true; |
| 128 |
| 128 case WebInputEvent::GesturePinchBegin: | 129 case WebInputEvent::GesturePinchBegin: |
| 129 case WebInputEvent::GesturePinchEnd: | 130 case WebInputEvent::GesturePinchEnd: |
| 130 case WebInputEvent::GesturePinchUpdate: | 131 case WebInputEvent::GesturePinchUpdate: |
| 131 // TODO(rjkroege): Debounce pinch (http://crbug.com/147647) | 132 // TODO(rjkroege): Debounce pinch (http://crbug.com/147647) |
| 132 return true; | 133 return true; |
| 133 default: | 134 default: |
| 134 if (scrolling_in_progress_) { | 135 if (scrolling_in_progress_) { |
| 135 debouncing_deferral_queue_.push_back(gesture_event); | 136 debouncing_deferral_queue_.push_back(gesture_event); |
| 136 return false; | 137 return false; |
| 137 } | 138 } |
| (...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 389 return 0; | 390 return 0; |
| 390 | 391 |
| 391 if (!ignore_next_ack_) | 392 if (!ignore_next_ack_) |
| 392 return 1; | 393 return 1; |
| 393 | 394 |
| 394 DCHECK_GT(coalesced_gesture_events_.size(), 1U); | 395 DCHECK_GT(coalesced_gesture_events_.size(), 1U); |
| 395 return 2; | 396 return 2; |
| 396 } | 397 } |
| 397 | 398 |
| 398 } // namespace content | 399 } // namespace content |
| OLD | NEW |