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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/TapSuppressionHeuristics.java

Issue 2096203002: [TTS] Basic Tap Suppression functionality. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added compensation for Quick Answers and rebased. Created 4 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/TapSuppressionHeuristics.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/TapSuppressionHeuristics.java b/chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/TapSuppressionHeuristics.java
index fe05a6c4d6430842affb1e36c9c3d22c99234f91..1e8030cfdfd61e9b6d006244cc0ea7c3c8964142 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/TapSuppressionHeuristics.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/TapSuppressionHeuristics.java
@@ -8,16 +8,16 @@ package org.chromium.chrome.browser.contextualsearch;
* A set of {@link ContextualSearchHeuristic}s that support experimentation and logging.
*/
public class TapSuppressionHeuristics extends ContextualSearchHeuristics {
-
/**
* Gets all the heuristics needed for Tap suppression.
* @param selectionController The {@link ContextualSearchSelectionController}.
* @param previousTapState The state of the previous tap, or {@code null}.
* @param x The x position of the Tap.
* @param y The y position of the Tap.
+ * @param tapsSinceOpen the number of Tap gestures since the last open of the panel.
*/
TapSuppressionHeuristics(ContextualSearchSelectionController selectionController,
- ContextualSearchTapState previousTapState, int x, int y) {
+ ContextualSearchTapState previousTapState, int x, int y, int tapsSinceOpen) {
super();
RecentScrollTapSuppression scrollTapExperiment =
new RecentScrollTapSuppression(selectionController);
@@ -31,6 +31,10 @@ public class TapSuppressionHeuristics extends ContextualSearchHeuristics {
BarOverlapTapSuppression barOverlapTapSuppression =
new BarOverlapTapSuppression(selectionController, x, y);
mHeuristics.add(barOverlapTapSuppression);
+ // General Tap Suppression and Tap Twice.
+ TapSuppression tapSuppression =
+ new TapSuppression(selectionController, previousTapState, x, y, tapsSinceOpen);
+ mHeuristics.add(tapSuppression);
}
/**

Powered by Google App Engine
This is Rietveld 408576698