| 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> |
| 8 |
| 7 #include "content/browser/renderer_host/input/gesture_event_queue.h" | 9 #include "content/browser/renderer_host/input/gesture_event_queue.h" |
| 8 | 10 |
| 9 using blink::WebInputEvent; | 11 using blink::WebInputEvent; |
| 10 | 12 |
| 11 namespace content { | 13 namespace content { |
| 12 | 14 |
| 13 TouchscreenTapSuppressionController::TouchscreenTapSuppressionController( | 15 TouchscreenTapSuppressionController::TouchscreenTapSuppressionController( |
| 14 GestureEventQueue* geq, | 16 GestureEventQueue* geq, |
| 15 const TapSuppressionController::Config& config) | 17 const TapSuppressionController::Config& config) |
| 16 : gesture_event_queue_(geq), controller_(this, config) { | 18 : gesture_event_queue_(geq), controller_(this, config) { |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 return false; | 58 return false; |
| 57 } | 59 } |
| 58 | 60 |
| 59 void TouchscreenTapSuppressionController::DropStashedTapDown() { | 61 void TouchscreenTapSuppressionController::DropStashedTapDown() { |
| 60 stashed_tap_down_.reset(); | 62 stashed_tap_down_.reset(); |
| 61 stashed_show_press_.reset(); | 63 stashed_show_press_.reset(); |
| 62 } | 64 } |
| 63 | 65 |
| 64 void TouchscreenTapSuppressionController::ForwardStashedTapDown() { | 66 void TouchscreenTapSuppressionController::ForwardStashedTapDown() { |
| 65 DCHECK(stashed_tap_down_); | 67 DCHECK(stashed_tap_down_); |
| 66 ScopedGestureEvent tap_down = stashed_tap_down_.Pass(); | 68 ScopedGestureEvent tap_down = std::move(stashed_tap_down_); |
| 67 ScopedGestureEvent show_press = stashed_show_press_.Pass(); | 69 ScopedGestureEvent show_press = std::move(stashed_show_press_); |
| 68 gesture_event_queue_->ForwardGestureEvent(*tap_down); | 70 gesture_event_queue_->ForwardGestureEvent(*tap_down); |
| 69 if (show_press) | 71 if (show_press) |
| 70 gesture_event_queue_->ForwardGestureEvent(*show_press); | 72 gesture_event_queue_->ForwardGestureEvent(*show_press); |
| 71 } | 73 } |
| 72 | 74 |
| 73 } // namespace content | 75 } // namespace content |
| OLD | NEW |