| Index: chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchTapState.java
|
| diff --git a/chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchTapState.java b/chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchTapState.java
|
| index ce2495ef0b27a055685aed53b3f14c5b51c781dc..8e839d1f30a9c752331bf41e214ca7e41e4c9a50 100644
|
| --- a/chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchTapState.java
|
| +++ b/chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchTapState.java
|
| @@ -6,19 +6,26 @@ package org.chromium.chrome.browser.contextualsearch;
|
|
|
| /**
|
| * Encapsulates the state of a recent Tap gesture; x, y position and if suppressed.
|
| + * Instances of this class are immutable.
|
| */
|
| class ContextualSearchTapState {
|
| - private final boolean mWasSuppressed;
|
| private final float mX;
|
| private final float mY;
|
| + private final long mTapTimeNanoseconds;
|
| + private final boolean mWasSuppressed;
|
|
|
| /**
|
| * Constructs a Tap at the given x,y position and indicates if the tap was suppressed or not.
|
| + * @param x The x coordinate of the current tap.
|
| + * @param y The y coordinate of the current tap.
|
| + * @param tapTimeNanoseconds The timestamp when the Tap occurred.
|
| + * @param wasSuppressed Whether this tap was suppressed for any reason.
|
| */
|
| - ContextualSearchTapState(float x, float y, boolean wasSuppressed) {
|
| - mWasSuppressed = wasSuppressed;
|
| + ContextualSearchTapState(float x, float y, long tapTimeNanoseconds, boolean wasSuppressed) {
|
| mX = x;
|
| mY = y;
|
| + mTapTimeNanoseconds = tapTimeNanoseconds;
|
| + mWasSuppressed = wasSuppressed;
|
| }
|
|
|
| /**
|
| @@ -36,6 +43,13 @@ class ContextualSearchTapState {
|
| }
|
|
|
| /**
|
| + * @return The time of the Tap in nanoseconds.
|
| + */
|
| + long tapTimeNanoseconds() {
|
| + return mTapTimeNanoseconds;
|
| + }
|
| +
|
| + /**
|
| * @return Whether this Tap was suppressed.
|
| */
|
| boolean wasSuppressed() {
|
|
|