summaryrefslogtreecommitdiffstats
path: root/chromium/content/browser/renderer_host/input/tap_suppression_controller.h
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/content/browser/renderer_host/input/tap_suppression_controller.h')
-rw-r--r--chromium/content/browser/renderer_host/input/tap_suppression_controller.h22
1 files changed, 20 insertions, 2 deletions
diff --git a/chromium/content/browser/renderer_host/input/tap_suppression_controller.h b/chromium/content/browser/renderer_host/input/tap_suppression_controller.h
index ef662f32f7b..93977f950c3 100644
--- a/chromium/content/browser/renderer_host/input/tap_suppression_controller.h
+++ b/chromium/content/browser/renderer_host/input/tap_suppression_controller.h
@@ -19,7 +19,22 @@ class TapSuppressionControllerClient;
// GestureFlingCancel are suppressed.
class CONTENT_EXPORT TapSuppressionController {
public:
- explicit TapSuppressionController(TapSuppressionControllerClient* client);
+ struct CONTENT_EXPORT Config {
+ Config();
+
+ // Defaults to false, in which case no suppression is performed.
+ bool enabled;
+
+ // The maximum time allowed between a GestureFlingCancel and its
+ // corresponding tap down.
+ base::TimeDelta max_cancel_to_down_time;
+
+ // The maximum time allowed between a single tap's down and up events.
+ base::TimeDelta max_tap_gap_time;
+ };
+
+ TapSuppressionController(TapSuppressionControllerClient* client,
+ const Config& config);
virtual ~TapSuppressionController();
// Should be called whenever a GestureFlingCancel event is received.
@@ -49,17 +64,20 @@ class CONTENT_EXPORT TapSuppressionController {
friend class MockTapSuppressionController;
enum State {
+ DISABLED,
NOTHING,
GFC_IN_PROGRESS,
TAP_DOWN_STASHED,
LAST_CANCEL_STOPPED_FLING,
};
-
TapSuppressionControllerClient* client_;
base::OneShotTimer<TapSuppressionController> tap_down_timer_;
State state_;
+ base::TimeDelta max_cancel_to_down_time_;
+ base::TimeDelta max_tap_gap_time_;
+
// TODO(rjkroege): During debugging, the event times did not prove reliable.
// Replace the use of base::TimeTicks with an accurate event time when they
// become available post http://crbug.com/119556.