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

Unified Diff: chrome/browser/ui/gesture_prefs_observer_factory_aura.cc

Issue 11299276: Bound the maximum touchscreen fling velocity. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 1 month 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: chrome/browser/ui/gesture_prefs_observer_factory_aura.cc
diff --git a/chrome/browser/ui/gesture_prefs_observer_factory_aura.cc b/chrome/browser/ui/gesture_prefs_observer_factory_aura.cc
index 5669fc7546aa2754b78ed3c9a8b0b7e88108c975..d52ecc1b3a27bddcbb6c5ee26a797815b189b4be 100644
--- a/chrome/browser/ui/gesture_prefs_observer_factory_aura.cc
+++ b/chrome/browser/ui/gesture_prefs_observer_factory_aura.cc
@@ -78,6 +78,7 @@ const char* kPrefsToObserve[] = {
prefs::kFlingAccelerationCurveCoefficient1,
prefs::kFlingAccelerationCurveCoefficient2,
prefs::kFlingAccelerationCurveCoefficient3,
+ prefs::kFlingVelocityCap,
prefs::kLongPressTimeInSeconds,
prefs::kMaxDistanceForTwoFingerTapInPixels,
prefs::kMaxSecondsBetweenDoubleClick,
@@ -136,6 +137,8 @@ void GesturePrefsObserver::Update() {
prefs_->GetDouble(prefs::kFlingAccelerationCurveCoefficient2));
GestureConfiguration::set_fling_acceleration_curve_coefficients(3,
prefs_->GetDouble(prefs::kFlingAccelerationCurveCoefficient3));
+ GestureConfiguration::set_fling_velocity_cap(
+ prefs_->GetDouble(prefs::kFlingVelocityCap));
GestureConfiguration::set_long_press_time_in_seconds(
prefs_->GetDouble(
prefs::kLongPressTimeInSeconds));
@@ -256,6 +259,10 @@ void GesturePrefsObserverFactoryAura::RegisterUserPrefs(PrefService* prefs) {
GestureConfiguration::fling_acceleration_curve_coefficients(3),
PrefService::UNSYNCABLE_PREF);
prefs->RegisterDoublePref(
+ prefs::kFlingVelocityCap,
+ GestureConfiguration::fling_velocity_cap(),
+ PrefService::UNSYNCABLE_PREF);
+ prefs->RegisterDoublePref(
prefs::kLongPressTimeInSeconds,
GestureConfiguration::long_press_time_in_seconds(),
PrefService::UNSYNCABLE_PREF);

Powered by Google App Engine
This is Rietveld 408576698