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

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

Issue 630003003: Change GestureConfiguration types to be consistent with each other and with the (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Really fix compile Created 6 years, 2 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/browser/ui/webui/chromeos/salsa_ui.cc » ('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 2109f5b071a27a9350e38c28c0a25d417e10c6c5..636cd39438ecaf013547f71fc2afdb0280b1d76a 100644
--- a/chrome/browser/ui/gesture_prefs_observer_factory_aura.cc
+++ b/chrome/browser/ui/gesture_prefs_observer_factory_aura.cc
@@ -93,9 +93,9 @@ class GesturePrefsObserver : public KeyedService {
const char* kPrefsToObserve[] = {
prefs::kFlingMaxCancelToDownTimeInMs,
prefs::kFlingMaxTapGapTimeInMs,
- prefs::kTabScrubActivationDelayInMS,
+ prefs::kTabScrubActivationDelayInMs,
prefs::kMaxSeparationForGestureTouchesInPixels,
- prefs::kSemiLongPressTimeInSeconds,
+ prefs::kSemiLongPressTimeInMs,
};
const char* kPrefsToRemove[] = {
@@ -103,6 +103,7 @@ const char* kPrefsToRemove[] = {
"gesture.fling_acceleration_curve_coefficient_1",
"gesture.fling_acceleration_curve_coefficient_2",
"gesture.fling_acceleration_curve_coefficient_3",
+ "gesture.semi_long_press_time_in_seconds",
"flingcurve.touchpad_alpha",
"flingcurve.touchpad_beta",
"flingcurve.touchpad_gamma",
@@ -148,11 +149,12 @@ void GesturePrefsObserver::Update() {
GestureConfiguration::set_fling_max_tap_gap_time_in_ms(
prefs_->GetInteger(prefs::kFlingMaxTapGapTimeInMs));
GestureConfiguration::set_tab_scrub_activation_delay_in_ms(
- prefs_->GetInteger(prefs::kTabScrubActivationDelayInMS));
- GestureConfiguration::set_semi_long_press_time_in_seconds(
- prefs_->GetDouble(prefs::kSemiLongPressTimeInSeconds));
+ prefs_->GetInteger(prefs::kTabScrubActivationDelayInMs));
+ GestureConfiguration::set_semi_long_press_time_in_ms(
+ prefs_->GetInteger(prefs::kSemiLongPressTimeInMs));
GestureConfiguration::set_max_separation_for_gesture_touches_in_pixels(
- prefs_->GetDouble(prefs::kMaxSeparationForGestureTouchesInPixels));
+ static_cast<float>(
+ prefs_->GetDouble(prefs::kMaxSeparationForGestureTouchesInPixels)));
UpdateOverscrollPrefs();
}
@@ -217,12 +219,12 @@ void GesturePrefsObserverFactoryAura::RegisterProfilePrefs(
GestureConfiguration::fling_max_tap_gap_time_in_ms(),
user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
registry->RegisterIntegerPref(
- prefs::kTabScrubActivationDelayInMS,
+ prefs::kTabScrubActivationDelayInMs,
GestureConfiguration::tab_scrub_activation_delay_in_ms(),
user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
- registry->RegisterDoublePref(
- prefs::kSemiLongPressTimeInSeconds,
- GestureConfiguration::semi_long_press_time_in_seconds(),
+ registry->RegisterIntegerPref(
+ prefs::kSemiLongPressTimeInMs,
+ GestureConfiguration::semi_long_press_time_in_ms(),
user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
registry->RegisterDoublePref(
prefs::kMaxSeparationForGestureTouchesInPixels,
« no previous file with comments | « chrome/browser/resources/gesture_config.js ('k') | chrome/browser/ui/webui/chromeos/salsa_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698