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/gesture_event_filter.h" | 5 #include "content/browser/renderer_host/input/gesture_event_filter.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/strings/string_number_conversions.h" | 8 #include "base/strings/string_number_conversions.h" |
9 #include "content/browser/renderer_host/input/input_router.h" | 9 #include "content/browser/renderer_host/input/input_router.h" |
10 #include "content/browser/renderer_host/input/touchpad_tap_suppression_controlle
r.h" | 10 #include "content/browser/renderer_host/input/touchpad_tap_suppression_controlle
r.h" |
(...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
361 | 361 |
362 void GestureEventFilter::SendEventsIgnoringAck() { | 362 void GestureEventFilter::SendEventsIgnoringAck() { |
363 GestureEventWithLatencyInfo gesture_event; | 363 GestureEventWithLatencyInfo gesture_event; |
364 while (!coalesced_gesture_events_.empty()) { | 364 while (!coalesced_gesture_events_.empty()) { |
365 gesture_event = coalesced_gesture_events_.front(); | 365 gesture_event = coalesced_gesture_events_.front(); |
366 if (!GestureEventFilter::ShouldIgnoreAckForGestureType( | 366 if (!GestureEventFilter::ShouldIgnoreAckForGestureType( |
367 gesture_event.event.type)) { | 367 gesture_event.event.type)) { |
368 return; | 368 return; |
369 } | 369 } |
370 coalesced_gesture_events_.pop_front(); | 370 coalesced_gesture_events_.pop_front(); |
371 | |
372 // TODO - once Blink accepts tap down events correctly, re-enable tap | |
373 // down. See crbug.com/302752. | |
374 if (gesture_event.event.type == WebInputEvent::GestureTapDown) | |
375 continue; | |
376 | |
377 client_->SendGestureEventImmediately(gesture_event); | 371 client_->SendGestureEventImmediately(gesture_event); |
378 } | 372 } |
379 } | 373 } |
380 | 374 |
381 bool GestureEventFilter::ShouldIgnoreAckForGestureType( | 375 bool GestureEventFilter::ShouldIgnoreAckForGestureType( |
382 WebInputEvent::Type type) { | 376 WebInputEvent::Type type) { |
383 return type == WebInputEvent::GestureTapDown || | 377 return type == WebInputEvent::GestureTapDown || |
384 type == WebInputEvent::GestureShowPress; | 378 type == WebInputEvent::GestureShowPress; |
385 } | 379 } |
386 | 380 |
387 } // namespace content | 381 } // namespace content |
OLD | NEW |