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

Unified Diff: content/browser/android/content_view_core_impl.cc

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/browser/android/content_view_core_impl.cc
diff --git a/content/browser/android/content_view_core_impl.cc b/content/browser/android/content_view_core_impl.cc
index 77e7ab21d9e105d10ec7a6a437e25efc27bd1061..5b6723f3eb0a7a085bbe1dd637a5b7a580a99cf3 100644
--- a/content/browser/android/content_view_core_impl.cc
+++ b/content/browser/android/content_view_core_impl.cc
@@ -979,24 +979,6 @@ void ContentViewCoreImpl::FlingCancel(JNIEnv* env,
SendGestureEvent(event);
}
-void ContentViewCoreImpl::SingleTap(JNIEnv* env,
- const JavaParamRef<jobject>& obj,
- jlong time_ms,
- jfloat x,
- jfloat y) {
- // Tap gestures should always be preceded by a TapDown, ensuring consistency
- // with the touch-based gesture detection pipeline.
- WebGestureEvent tap_down_event = MakeGestureEvent(
- WebInputEvent::GestureTapDown, time_ms, x, y);
- tap_down_event.data.tap.tapCount = 1;
- SendGestureEvent(tap_down_event);
-
- WebGestureEvent tap_event = MakeGestureEvent(
- WebInputEvent::GestureTap, time_ms, x, y);
- tap_event.data.tap.tapCount = 1;
- SendGestureEvent(tap_event);
-}
-
void ContentViewCoreImpl::DoubleTap(JNIEnv* env,
const JavaParamRef<jobject>& obj,
jlong time_ms,
@@ -1011,15 +993,20 @@ void ContentViewCoreImpl::DoubleTap(JNIEnv* env,
SendGestureEvent(event);
}
-void ContentViewCoreImpl::LongPress(JNIEnv* env,
- const JavaParamRef<jobject>& obj,
- jlong time_ms,
- jfloat x,
- jfloat y) {
- WebGestureEvent event = MakeGestureEvent(
- WebInputEvent::GestureLongPress, time_ms, x, y);
+void ContentViewCoreImpl::ResolveTapDisambiguation(
+ JNIEnv* env,
+ const JavaParamRef<jobject>& obj,
+ jlong time_ms,
+ jfloat x,
+ jfloat y,
+ jboolean is_long_press) {
+ RenderWidgetHostViewAndroid* rwhv = GetRenderWidgetHostViewAndroid();
+ if (!rwhv)
+ return;
- SendGestureEvent(event);
+ rwhv->ResolveTapDisambiguation(time_ms / 1000.0,
+ gfx::Point(x / dpi_scale_, y / dpi_scale_),
+ is_long_press);
}
void ContentViewCoreImpl::PinchBegin(JNIEnv* env,
« no previous file with comments | « content/browser/android/content_view_core_impl.h ('k') | content/browser/renderer_host/render_widget_host_view_android.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698