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

Unified Diff: content/common/android/view_configuration.cc

Issue 95153002: Make touch-based synthetic gesture take touch slop into account. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Minor refactoring of pinch gesture. Created 7 years 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/common/android/view_configuration.cc
diff --git a/content/common/android/view_configuration.cc b/content/common/android/view_configuration.cc
index 9363ebbd99e40136fa2fa010ef1155c232a66e6c..e42a17a65cce52612710dd2e94d1701c560539f1 100644
--- a/content/common/android/view_configuration.cc
+++ b/content/common/android/view_configuration.cc
@@ -52,6 +52,18 @@ int ViewConfiguration::GetMinimumFlingVelocityInPixelsPerSecond() {
return Java_ViewConfiguration_getScaledMinimumFlingVelocity(env, view.obj());
}
+int ViewConfiguration::GetTouchSlopInDips() {
+ JNIEnv* env = AttachCurrentThread();
+ return Java_ViewConfiguration_getTouchSlop(env);
Dominik Grewe 2013/12/02 12:03:36 This method is actually deprecated (and so are the
jdduke (slow) 2013/12/02 15:51:40 Let's remove the GetTouchSlopInDips() then so peop
+}
+
+int ViewConfiguration::GetTouchSlopInPixels() {
+ JNIEnv* env = AttachCurrentThread();
+ ScopedJavaLocalRef<jobject> view =
+ Java_ViewConfiguration_get(env, GetApplicationContext());
+ return Java_ViewConfiguration_getScaledTouchSlop(env, view.obj());
+}
+
bool ViewConfiguration::RegisterViewConfiguration(JNIEnv* env) {
return RegisterNativesImpl(env);
}

Powered by Google App Engine
This is Rietveld 408576698