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 739a66ab7a2fb0074f31d921dd8aa60857e11c7b..6f423ffadd1b63567c01a74630a27da672b2101e 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 |
@@ -459,6 +459,21 @@ public class ContentViewCore |
private ViewAndroid mViewAndroid; |
+ public enum UMAActionAfterDoubleTap { |
bulach
2013/11/04 18:22:31
can't have enums on android java, it's really frow
Rick Byers
2013/11/04 18:34:41
Sorry, my bad - I asked bokan to switch to using r
bokan
2013/11/04 20:01:08
Done.
|
+ NAVIGATE_BACK(0), NAVIGATE_STOP(1), NO_ACTION(2), COUNT(3); |
+ |
+ private final int value; |
+ private UMAActionAfterDoubleTap(int value) { this.value = value; } |
+ public int getValue() { return value; } |
+ } |
+ |
+ public enum UMASingleTapType { |
+ DELAYED_TAP(0), UNDELAYED_TAP(1), COUNT(2); |
+ |
+ private final int value; |
+ private UMASingleTapType(int value) { this.value = value; } |
+ public int getValue() { return value; } |
+ } |
/** |
* Constructs a new ContentViewCore. Embedders must call initialize() after constructing |
@@ -1323,6 +1338,10 @@ public class ContentViewCore |
} |
} |
+ public void reportActionAfterDoubleTapUMA(UMAActionAfterDoubleTap type) { |
+ mContentViewGestureHandler.reportActionAfterDoubleTapUMA(type); |
+ } |
+ |
@Override |
public boolean sendGesture(int type, long timeMs, int x, int y, Bundle b) { |
if (offerGestureToEmbedder(type)) return false; |
@@ -1394,6 +1413,24 @@ public class ContentViewCore |
} |
@Override |
+ public void sendSingleTapUMA(UMASingleTapType type) { |
+ nativeSendSingleTapUma( |
+ mNativeContentViewCore, |
+ type.getValue(), |
+ UMASingleTapType.COUNT.getValue()); |
+ } |
+ |
+ @Override |
+ public void sendActionAfterDoubleTapUMA(UMAActionAfterDoubleTap type, |
+ boolean clickDelayEnabled) { |
+ nativeSendActionAfterDoubleTapUma( |
+ mNativeContentViewCore, |
+ type.getValue(), |
+ clickDelayEnabled, |
+ UMAActionAfterDoubleTap.COUNT.getValue()); |
+ } |
+ |
+ @Override |
public void onSentLastGestureForVSync(long eventTimeMs) { |
if (isVSyncNotificationEnabled()) { |
mDidSignalVSyncUsingInputEvent = true; |
@@ -3375,4 +3412,10 @@ public class ContentViewCore |
private native void nativeSetAccessibilityEnabled( |
int nativeContentViewCoreImpl, boolean enabled); |
+ |
+ private native void nativeSendSingleTapUma(int nativeContentViewCoreImpl, |
+ int type, int count); |
+ |
+ private native void nativeSendActionAfterDoubleTapUma(int nativeContentViewCoreImpl, |
+ int type, boolean hasDelay, int count); |
} |