OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "content/common/android/view_configuration.h" | 5 #include "content/common/android/view_configuration.h" |
6 | 6 |
7 #include "base/android/jni_android.h" | 7 #include "base/android/jni_android.h" |
8 #include "jni/ViewConfiguration_jni.h" | 8 #include "jni/ViewConfiguration_jni.h" |
9 | 9 |
10 using namespace JNI_ViewConfiguration; | 10 using namespace JNI_ViewConfiguration; |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 return Java_ViewConfiguration_getScaledMaximumFlingVelocity(env, view.obj()); | 45 return Java_ViewConfiguration_getScaledMaximumFlingVelocity(env, view.obj()); |
46 } | 46 } |
47 | 47 |
48 int ViewConfiguration::GetMinimumFlingVelocityInPixelsPerSecond() { | 48 int ViewConfiguration::GetMinimumFlingVelocityInPixelsPerSecond() { |
49 JNIEnv* env = AttachCurrentThread(); | 49 JNIEnv* env = AttachCurrentThread(); |
50 ScopedJavaLocalRef<jobject> view = | 50 ScopedJavaLocalRef<jobject> view = |
51 Java_ViewConfiguration_get(env, GetApplicationContext()); | 51 Java_ViewConfiguration_get(env, GetApplicationContext()); |
52 return Java_ViewConfiguration_getScaledMinimumFlingVelocity(env, view.obj()); | 52 return Java_ViewConfiguration_getScaledMinimumFlingVelocity(env, view.obj()); |
53 } | 53 } |
54 | 54 |
| 55 int ViewConfiguration::GetTouchSlopInPixels() { |
| 56 JNIEnv* env = AttachCurrentThread(); |
| 57 ScopedJavaLocalRef<jobject> view = |
| 58 Java_ViewConfiguration_get(env, GetApplicationContext()); |
| 59 return Java_ViewConfiguration_getScaledTouchSlop(env, view.obj()); |
| 60 } |
| 61 |
55 bool ViewConfiguration::RegisterViewConfiguration(JNIEnv* env) { | 62 bool ViewConfiguration::RegisterViewConfiguration(JNIEnv* env) { |
56 return RegisterNativesImpl(env); | 63 return RegisterNativesImpl(env); |
57 } | 64 } |
58 | 65 |
59 } // namespace content | 66 } // namespace content |
OLD | NEW |