Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(60)

Side by Side Diff: content/browser/renderer_host/input/touchscreen_tap_suppression_controller.cc

Issue 2573073003: Collapse the API surface on WebInputEvent via accessor functions. (Closed)
Patch Set: Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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 if (!controller_.ShouldDeferTapDown()) 36 if (!controller_.ShouldDeferTapDown())
37 return false; 37 return false;
38 stashed_tap_down_.reset(new GestureEventWithLatencyInfo(event)); 38 stashed_tap_down_.reset(new GestureEventWithLatencyInfo(event));
39 return true; 39 return true;
40 40
41 case WebInputEvent::GestureShowPress: 41 case WebInputEvent::GestureShowPress:
42 if (!stashed_tap_down_) 42 if (!stashed_tap_down_)
43 return false; 43 return false;
44 stashed_show_press_.reset(new GestureEventWithLatencyInfo(event)); 44 stashed_show_press_.reset(new GestureEventWithLatencyInfo(event));
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 90
91 void TouchscreenTapSuppressionController::ForwardStashedTapDown() { 91 void TouchscreenTapSuppressionController::ForwardStashedTapDown() {
92 DCHECK(stashed_tap_down_); 92 DCHECK(stashed_tap_down_);
93 ScopedGestureEvent tap_down = std::move(stashed_tap_down_); 93 ScopedGestureEvent tap_down = std::move(stashed_tap_down_);
94 gesture_event_queue_->ForwardGestureEvent(*tap_down); 94 gesture_event_queue_->ForwardGestureEvent(*tap_down);
95 stashed_show_press_.reset(); 95 stashed_show_press_.reset();
96 stashed_long_press_.reset(); 96 stashed_long_press_.reset();
97 } 97 }
98 98
99 } // namespace content 99 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698