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

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

Issue 10532212: Gesture Recognizer: Make short long press time configurable. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: patch Created 8 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 | « chrome/browser/resources/gesture_config.js ('k') | chrome/common/pref_names.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 2550473da63b79060b484b03f0283c3a9be93179..94daaab61fb8a1139c07c3696fa1a68a2d009231 100644
--- a/chrome/browser/ui/gesture_prefs_observer_factory_aura.cc
+++ b/chrome/browser/ui/gesture_prefs_observer_factory_aura.cc
@@ -47,6 +47,7 @@ class GesturePrefsObserver : public content::NotificationObserver,
// in ui/base/gestures/gesture_configuration.h
const char* kPrefsToObserve[] = {
prefs::kLongPressTimeInSeconds,
+ prefs::kMaxDistanceForTwoFingerTapInPixels,
prefs::kMaxSecondsBetweenDoubleClick,
prefs::kMaxSeparationForGestureTouchesInPixels,
prefs::kMaxSwipeDeviationRatio,
@@ -62,6 +63,7 @@ const char* kPrefsToObserve[] = {
prefs::kPointsBufferedForVelocity,
prefs::kRailBreakProportion,
prefs::kRailStartProportion,
+ prefs::kSemiLongPressTimeInSeconds,
};
GesturePrefsObserver::GesturePrefsObserver(PrefService* prefs)
@@ -89,6 +91,9 @@ void GesturePrefsObserver::Update() {
GestureConfiguration::set_long_press_time_in_seconds(
prefs_->GetDouble(
prefs::kLongPressTimeInSeconds));
+ GestureConfiguration::set_semi_long_press_time_in_seconds(
+ prefs_->GetDouble(
+ prefs::kSemiLongPressTimeInSeconds));
GestureConfiguration::set_max_distance_for_two_finger_tap_in_pixels(
prefs_->GetDouble(
prefs::kMaxDistanceForTwoFingerTapInPixels));
@@ -164,6 +169,10 @@ void GesturePrefsObserverFactoryAura::RegisterUserPrefs(PrefService* prefs) {
GestureConfiguration::long_press_time_in_seconds(),
PrefService::UNSYNCABLE_PREF);
prefs->RegisterDoublePref(
+ prefs::kSemiLongPressTimeInSeconds,
+ GestureConfiguration::semi_long_press_time_in_seconds(),
+ PrefService::UNSYNCABLE_PREF);
+ prefs->RegisterDoublePref(
prefs::kMaxDistanceForTwoFingerTapInPixels,
GestureConfiguration::max_distance_for_two_finger_tap_in_pixels(),
PrefService::UNSYNCABLE_PREF);
« no previous file with comments | « chrome/browser/resources/gesture_config.js ('k') | chrome/common/pref_names.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698