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

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: Just removed a blank line. 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..93c92b5396564345362a2bdcdae6f2d67cd20a59 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
@@ -4,20 +4,23 @@
package org.chromium.chrome.browser.contextualsearch;
+import android.content.Context;
+
/**
* 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 context the Android Context.
* @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.
*/
- TapSuppressionHeuristics(ContextualSearchSelectionController selectionController,
- ContextualSearchTapState previousTapState, int x, int y) {
+ TapSuppressionHeuristics(Context context,
+ ContextualSearchSelectionController selectionController,
+ ContextualSearchTapState previousTapState, int x, int y) {
super();
RecentScrollTapSuppression scrollTapExperiment =
new RecentScrollTapSuppression(selectionController);
@@ -31,6 +34,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(context, selectionController, previousTapState, x, y);
+ mHeuristics.add(tapSuppression);
}
/**

Powered by Google App Engine
This is Rietveld 408576698