[TTS] Add onTouchDown to GestureStateListener

Desktop / Chromium - donnd [chromium.org] - 14 July 2017 17:55 EDT

Adds messaging from ContentViewCore to GestureStateListeners when any TouchDown occurs to allow timing of Tap events for Contextual Search.

Adds a heurisitc to Contextual Search to categorize a Tap by duration. CS will use the Tap duration as a signal for machine learning with the hope that accidental taps are short, and deliberate taps tend to be longer in duration. Log histograms for short and long duration tap CTR, and histograms of durations for seen and unseen to UMA.

BUG=723194,444114

Review-Url: https://codereview.chromium.org/2932623002 Cr-Commit-Position: refs/heads/master@{#486900}

4d1e08b [TTS] Add onTouchDown to GestureStateListener.
.../ContextualSearchFieldTrial.java | 34 +++++++++++--
.../ContextualSearchSelectionController.java | 23 +++++----
.../contextualsearch/ContextualSearchUma.java | 38 ++++++++++++++
.../contextualsearch/TapDurationSuppression.java | 58 ++++++++++++++++++++++
.../contextualsearch/TapSuppressionHeuristics.java | 3 +-
chrome/android/java_sources.gni | 1 +
.../ContextualSearchTapEventTest.java | 1 +
.../chromium/content/browser/ContentViewCore.java | 3 ++
.../browser/GestureStateListener.java | 18 ++++---
tools/metrics/histograms/histograms.xml | 40 +++++++++++++++
10 files changed, 198 insertions(+), 21 deletions(-)

Upstream: git.chromium.org


  • Share