| 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/touchscreen_tap_suppression_contro
     ller.h" |    5 #include "content/browser/renderer_host/input/touchscreen_tap_suppression_contro
     ller.h" | 
|    6  |    6  | 
|    7 #include <utility> |    7 #include <utility> | 
|    8  |    8  | 
|    9 #include "content/browser/renderer_host/input/gesture_event_queue.h" |    9 #include "content/browser/renderer_host/input/gesture_event_queue.h" | 
|   10  |   10  | 
| (...skipping 13 matching lines...) Expand all  Loading... | 
|   24   controller_.GestureFlingCancel(); |   24   controller_.GestureFlingCancel(); | 
|   25 } |   25 } | 
|   26  |   26  | 
|   27 void TouchscreenTapSuppressionController::GestureFlingCancelAck( |   27 void TouchscreenTapSuppressionController::GestureFlingCancelAck( | 
|   28     bool processed) { |   28     bool processed) { | 
|   29   controller_.GestureFlingCancelAck(processed); |   29   controller_.GestureFlingCancelAck(processed); | 
|   30 } |   30 } | 
|   31  |   31  | 
|   32 bool TouchscreenTapSuppressionController::FilterTapEvent( |   32 bool TouchscreenTapSuppressionController::FilterTapEvent( | 
|   33     const GestureEventWithLatencyInfo& event) { |   33     const GestureEventWithLatencyInfo& event) { | 
|   34   switch (event.event.type) { |   34   switch (event.event.type()) { | 
|   35     case WebInputEvent::GestureTapDown: |   35     case WebInputEvent::GestureTapDown: | 
|   36       forward_next_tap_cancel_ = false; |   36       forward_next_tap_cancel_ = false; | 
|   37       if (!controller_.ShouldDeferTapDown()) |   37       if (!controller_.ShouldDeferTapDown()) | 
|   38         return false; |   38         return false; | 
|   39       stashed_tap_down_.reset(new GestureEventWithLatencyInfo(event)); |   39       stashed_tap_down_.reset(new GestureEventWithLatencyInfo(event)); | 
|   40       return true; |   40       return true; | 
|   41  |   41  | 
|   42     case WebInputEvent::GestureShowPress: |   42     case WebInputEvent::GestureShowPress: | 
|   43       if (!stashed_tap_down_) |   43       if (!stashed_tap_down_) | 
|   44         return false; |   44         return false; | 
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|   94 void TouchscreenTapSuppressionController::ForwardStashedTapDown() { |   94 void TouchscreenTapSuppressionController::ForwardStashedTapDown() { | 
|   95   DCHECK(stashed_tap_down_); |   95   DCHECK(stashed_tap_down_); | 
|   96   ScopedGestureEvent tap_down = std::move(stashed_tap_down_); |   96   ScopedGestureEvent tap_down = std::move(stashed_tap_down_); | 
|   97   gesture_event_queue_->ForwardGestureEvent(*tap_down); |   97   gesture_event_queue_->ForwardGestureEvent(*tap_down); | 
|   98   stashed_show_press_.reset(); |   98   stashed_show_press_.reset(); | 
|   99   stashed_long_press_.reset(); |   99   stashed_long_press_.reset(); | 
|  100   forward_next_tap_cancel_ = true; |  100   forward_next_tap_cancel_ = true; | 
|  101 } |  101 } | 
|  102  |  102  | 
|  103 }  // namespace content |  103 }  // namespace content | 
| OLD | NEW |