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

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

Issue 628763003: Support InputRouter recycling (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Updates Created 6 years, 2 months 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 "content/browser/renderer_host/input/gesture_event_queue.h" 7 #include "content/browser/renderer_host/input/gesture_event_queue.h"
8 8
9 using blink::WebInputEvent; 9 using blink::WebInputEvent;
10 10
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 case WebInputEvent::GestureTap: 49 case WebInputEvent::GestureTap:
50 case WebInputEvent::GestureDoubleTap: 50 case WebInputEvent::GestureDoubleTap:
51 return controller_.ShouldSuppressTapEnd(); 51 return controller_.ShouldSuppressTapEnd();
52 52
53 default: 53 default:
54 break; 54 break;
55 } 55 }
56 return false; 56 return false;
57 } 57 }
58 58
59 void TouchscreenTapSuppressionController::Reset() {
60 controller_.Reset();
61 }
62
59 void TouchscreenTapSuppressionController::DropStashedTapDown() { 63 void TouchscreenTapSuppressionController::DropStashedTapDown() {
60 stashed_tap_down_.reset(); 64 stashed_tap_down_.reset();
61 stashed_show_press_.reset(); 65 stashed_show_press_.reset();
62 } 66 }
63 67
64 void TouchscreenTapSuppressionController::ForwardStashedTapDown() { 68 void TouchscreenTapSuppressionController::ForwardStashedTapDown() {
65 DCHECK(stashed_tap_down_); 69 DCHECK(stashed_tap_down_);
66 ScopedGestureEvent tap_down = stashed_tap_down_.Pass(); 70 ScopedGestureEvent tap_down = stashed_tap_down_.Pass();
67 ScopedGestureEvent show_press = stashed_show_press_.Pass(); 71 ScopedGestureEvent show_press = stashed_show_press_.Pass();
68 gesture_event_queue_->ForwardGestureEvent(*tap_down); 72 gesture_event_queue_->ForwardGestureEvent(*tap_down);
69 if (show_press) 73 if (show_press)
70 gesture_event_queue_->ForwardGestureEvent(*show_press); 74 gesture_event_queue_->ForwardGestureEvent(*show_press);
71 } 75 }
72 76
73 } // namespace content 77 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698