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

Side by Side Diff: content/browser/renderer_host/input/tap_suppression_controller.h

Issue 2542453003: Suppress LongPress/Tap, and TwoFingerTap when TapDown cancels a fling. (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 #ifndef CONTENT_BROWSER_RENDERER_HOST_INPUT_TAP_SUPPRESSION_CONTROLLER_H_ 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_INPUT_TAP_SUPPRESSION_CONTROLLER_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_INPUT_TAP_SUPPRESSION_CONTROLLER_H_ 6 #define CONTENT_BROWSER_RENDERER_HOST_INPUT_TAP_SUPPRESSION_CONTROLLER_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/time/time.h" 9 #include "base/time/time.h"
10 #include "base/timer/timer.h" 10 #include "base/timer/timer.h"
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 63
64 private: 64 private:
65 friend class MockTapSuppressionController; 65 friend class MockTapSuppressionController;
66 66
67 enum State { 67 enum State {
68 DISABLED, 68 DISABLED,
69 NOTHING, 69 NOTHING,
70 GFC_IN_PROGRESS, 70 GFC_IN_PROGRESS,
71 TAP_DOWN_STASHED, 71 TAP_DOWN_STASHED,
72 LAST_CANCEL_STOPPED_FLING, 72 LAST_CANCEL_STOPPED_FLING,
73 MUST_SUPPRESS_TAP_ENDS,
tdresser 2016/12/01 18:57:59 How about SUPPRESSING_TAPS? The events you're sup
sahel 2016/12/06 15:18:13 TapCancel as well. (Before LongTap and TwoFingerTa
73 }; 74 };
74 75
75 TapSuppressionControllerClient* client_; 76 TapSuppressionControllerClient* client_;
76 base::OneShotTimer tap_down_timer_; 77 base::OneShotTimer tap_down_timer_;
77 State state_; 78 State state_;
78 79
79 base::TimeDelta max_cancel_to_down_time_; 80 base::TimeDelta max_cancel_to_down_time_;
80 base::TimeDelta max_tap_gap_time_; 81 base::TimeDelta max_tap_gap_time_;
81 82
82 // TODO(rjkroege): During debugging, the event times did not prove reliable. 83 // TODO(rjkroege): During debugging, the event times did not prove reliable.
83 // Replace the use of base::TimeTicks with an accurate event time when they 84 // Replace the use of base::TimeTicks with an accurate event time when they
84 // become available post http://crbug.com/119556. 85 // become available post http://crbug.com/119556.
85 base::TimeTicks fling_cancel_time_; 86 base::TimeTicks fling_cancel_time_;
86 87
87 DISALLOW_COPY_AND_ASSIGN(TapSuppressionController); 88 DISALLOW_COPY_AND_ASSIGN(TapSuppressionController);
88 }; 89 };
89 90
90 } // namespace content 91 } // namespace content
91 92
92 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_TAP_SUPPRESSION_CONTROLLER_H_ 93 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_TAP_SUPPRESSION_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698