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

Unified Diff: ui/gfx/android/view_configuration.cc

Issue 340343013: Provide max gesture bounds and option to ignore touch size during pinch (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Code review Created 6 years, 6 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
« no previous file with comments | « ui/gfx/android/view_configuration.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/android/view_configuration.cc
diff --git a/ui/gfx/android/view_configuration.cc b/ui/gfx/android/view_configuration.cc
index 16c8617ed6bcd68cdaec78d630d934edf2f42ffa..6ce13a18a16e0f0619be04f8fbbd39eb5265bada 100644
--- a/ui/gfx/android/view_configuration.cc
+++ b/ui/gfx/android/view_configuration.cc
@@ -39,6 +39,8 @@ struct ViewConfigurationData {
Java_ViewConfigurationHelper_getLongPressTimeout(env);
tap_timeout_in_ms_ = Java_ViewConfigurationHelper_getTapTimeout(env);
scroll_friction_ = Java_ViewConfigurationHelper_getScrollFriction(env);
+ should_use_touch_major_in_scaling_span_ =
+ Java_ViewConfigurationHelper_shouldUseTouchMajorInScalingSpan(env);
jobject obj = j_view_configuration_helper_.obj();
Update(
@@ -71,6 +73,9 @@ struct ViewConfigurationData {
int long_press_timeout_in_ms() const { return long_press_timeout_in_ms_; }
int tap_timeout_in_ms() const { return tap_timeout_in_ms_; }
float scroll_friction() const { return scroll_friction_; }
+ bool should_use_touch_major_in_scaling_span() const {
+ return should_use_touch_major_in_scaling_span_;
+ }
int max_fling_velocity_in_pixels_s() {
base::AutoLock autolock(lock_);
@@ -127,6 +132,7 @@ struct ViewConfigurationData {
int long_press_timeout_in_ms_;
int tap_timeout_in_ms_;
float scroll_friction_;
+ bool should_use_touch_major_in_scaling_span_;
// These values may vary as view-specific parameters (DPI scale) are changed,
// so read/write access must be synchronized.
@@ -203,6 +209,10 @@ int ViewConfiguration::GetMinScalingTouchMajorInPixels() {
return g_view_configuration.Get().min_scaling_touch_major_in_pixels();
}
+bool ViewConfiguration::ShouldUseTouchMajorInScalingSpan() {
+ return g_view_configuration.Get().should_use_touch_major_in_scaling_span();
+}
+
bool ViewConfiguration::RegisterViewConfiguration(JNIEnv* env) {
return RegisterNativesImpl(env);
}
« no previous file with comments | « ui/gfx/android/view_configuration.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698