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

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

Issue 2906763002: [TTS] Add some initial signals for Tap in content. (Closed)
Patch Set: Created 3 years, 7 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/ContextualSearchSelectionController.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchSelectionController.java b/chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchSelectionController.java
index c2472f52a063530b64c3dc410f1714490152df36..8dd95fd602154ebf6a7bdc22b361ee603f08236b 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchSelectionController.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchSelectionController.java
@@ -205,7 +205,7 @@ public class ContextualSearchSelectionController {
if (baseContentView != null) {
baseContentView.clearSelection();
}
- resetAllStates();
+ resetSelectionStates();
Donn Denman 2017/05/25 19:56:47 This looks like a bug that encountered when doing
}
/**
@@ -352,7 +352,7 @@ public class ContextualSearchSelectionController {
* This should be called when the context is fully built (by gathering surrounding text
* if needed, etc) but before showing any UX.
*/
- void handleShouldSuppressTap() {
+ void handleShouldSuppressTap(ContextualSearchContext contextualSearchContext) {
int x = (int) mX;
int y = (int) mY;
@@ -360,8 +360,8 @@ public class ContextualSearchSelectionController {
ChromePreferenceManager prefs = ChromePreferenceManager.getInstance();
int adjustedTapsSinceOpen = prefs.getContextualSearchTapCount()
- prefs.getContextualSearchTapQuickAnswerCount();
- TapSuppressionHeuristics tapHeuristics =
- new TapSuppressionHeuristics(this, mLastTapState, x, y, adjustedTapsSinceOpen);
+ TapSuppressionHeuristics tapHeuristics = new TapSuppressionHeuristics(
+ this, mLastTapState, x, y, adjustedTapsSinceOpen, contextualSearchContext);
// TODO(donnd): Move to be called when the panel closes to work with states that change.
tapHeuristics.logConditionState();
// Tell the manager what it needs in order to log metrics on whether the tap would have

Powered by Google App Engine
This is Rietveld 408576698