OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 "chrome/browser/ui/gesture_prefs_observer_factory_aura.h" | 5 #include "chrome/browser/ui/gesture_prefs_observer_factory_aura.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
(...skipping 434 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
445 } else { | 445 } else { |
446 registry->RegisterDoublePref( | 446 registry->RegisterDoublePref( |
447 cycler_prefs[i].pref_name, | 447 cycler_prefs[i].pref_name, |
448 WorkspaceCyclerConfiguration::GetDouble(property), | 448 WorkspaceCyclerConfiguration::GetDouble(property), |
449 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); | 449 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); |
450 } | 450 } |
451 } | 451 } |
452 #endif // USE_ASH | 452 #endif // USE_ASH |
453 } | 453 } |
454 | 454 |
455 void GesturePrefsObserverFactoryAura::RegisterUserPrefs( | 455 void GesturePrefsObserverFactoryAura::RegisterProfilePrefs( |
456 user_prefs::PrefRegistrySyncable* registry) { | 456 user_prefs::PrefRegistrySyncable* registry) { |
457 registry->RegisterDoublePref( | 457 registry->RegisterDoublePref( |
458 prefs::kFlingAccelerationCurveCoefficient0, | 458 prefs::kFlingAccelerationCurveCoefficient0, |
459 GestureConfiguration::fling_acceleration_curve_coefficients(0), | 459 GestureConfiguration::fling_acceleration_curve_coefficients(0), |
460 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); | 460 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); |
461 registry->RegisterDoublePref( | 461 registry->RegisterDoublePref( |
462 prefs::kFlingAccelerationCurveCoefficient1, | 462 prefs::kFlingAccelerationCurveCoefficient1, |
463 GestureConfiguration::fling_acceleration_curve_coefficients(1), | 463 GestureConfiguration::fling_acceleration_curve_coefficients(1), |
464 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); | 464 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); |
465 registry->RegisterDoublePref( | 465 registry->RegisterDoublePref( |
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
591 // Use same gesture preferences on incognito windows. | 591 // Use same gesture preferences on incognito windows. |
592 return chrome::GetBrowserContextRedirectedInIncognito(context); | 592 return chrome::GetBrowserContextRedirectedInIncognito(context); |
593 } | 593 } |
594 | 594 |
595 bool GesturePrefsObserverFactoryAura::ServiceIsNULLWhileTesting() const { | 595 bool GesturePrefsObserverFactoryAura::ServiceIsNULLWhileTesting() const { |
596 // Some tests replace the PrefService of the TestingProfile after the | 596 // Some tests replace the PrefService of the TestingProfile after the |
597 // GesturePrefsObserver has been created, which makes Shutdown() | 597 // GesturePrefsObserver has been created, which makes Shutdown() |
598 // remove the registrar from a non-existent PrefService. | 598 // remove the registrar from a non-existent PrefService. |
599 return true; | 599 return true; |
600 } | 600 } |
OLD | NEW |