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

Unified Diff: content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java

Issue 2783233004: Refine tap disambiguation UMA to track same-node/different-node. (Closed)
Patch Set: Deprecate existing field Created 3 years, 9 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: content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
diff --git a/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java b/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
index f383a61fc7a87b23f501a6b465edc8efbb5beeea..1cf518b67c0a4f6eddd463f2dda8196b04c8a981 100644
--- a/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
+++ b/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
@@ -734,28 +734,17 @@ public class ContentViewCore implements AccessibilityStateChangeListener, Displa
});
}
});
- // TODO(yongsheng): LONG_TAP is not enabled in PopupZoomer. So need to dispatch a LONG_TAP
- // gesture if a user completes a tap on PopupZoomer UI after a LONG_PRESS gesture.
PopupZoomer.OnTapListener listener = new PopupZoomer.OnTapListener() {
// mContainerView can change, but this OnTapListener can only be used
// with the mContainerViewAtCreation.
private final ViewGroup mContainerViewAtCreation = mContainerView;
@Override
- public boolean onSingleTap(View v, MotionEvent e) {
+ public void onResolveTapDisambiguation(
+ long timeMs, float x, float y, boolean isLongPress) {
+ if (mNativeContentViewCore == 0) return;
mContainerViewAtCreation.requestFocus();
- if (mNativeContentViewCore != 0) {
- nativeSingleTap(mNativeContentViewCore, e.getEventTime(), e.getX(), e.getY());
- }
- return true;
- }
-
- @Override
- public boolean onLongPress(View v, MotionEvent e) {
- if (mNativeContentViewCore != 0) {
- nativeLongPress(mNativeContentViewCore, e.getEventTime(), e.getX(), e.getY());
- }
- return true;
+ nativeResolveTapDisambiguation(mNativeContentViewCore, timeMs, x, y, isLongPress);
}
};
mPopupZoomer.setOnTapListener(listener);
@@ -2644,14 +2633,11 @@ public class ContentViewCore implements AccessibilityStateChangeListener, Displa
private native void nativeFlingCancel(long nativeContentViewCoreImpl, long timeMs);
- private native void nativeSingleTap(
- long nativeContentViewCoreImpl, long timeMs, float x, float y);
-
private native void nativeDoubleTap(
long nativeContentViewCoreImpl, long timeMs, float x, float y);
- private native void nativeLongPress(
- long nativeContentViewCoreImpl, long timeMs, float x, float y);
+ private native void nativeResolveTapDisambiguation(
+ long nativeContentViewCoreImpl, long timeMs, float x, float y, boolean isLongPress);
private native void nativePinchBegin(
long nativeContentViewCoreImpl, long timeMs, float x, float y);
« no previous file with comments | « content/common/view_messages.h ('k') | content/public/android/java/src/org/chromium/content/browser/PopupZoomer.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698