| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "base/compiler_specific.h" | 7 #include "base/compiler_specific.h" |
| 8 #include "chrome/browser/api/prefs/pref_change_registrar.h" | 8 #include "chrome/browser/api/prefs/pref_change_registrar.h" |
| 9 #include "chrome/browser/prefs/pref_service.h" | 9 #include "chrome/browser/prefs/pref_service.h" |
| 10 #include "chrome/browser/profiles/profile.h" | 10 #include "chrome/browser/profiles/profile.h" |
| (...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 246 prefs->RegisterDoublePref( | 246 prefs->RegisterDoublePref( |
| 247 prefs::kRailStartProportion, | 247 prefs::kRailStartProportion, |
| 248 GestureConfiguration::rail_start_proportion(), | 248 GestureConfiguration::rail_start_proportion(), |
| 249 PrefService::UNSYNCABLE_PREF); | 249 PrefService::UNSYNCABLE_PREF); |
| 250 prefs->RegisterDoublePref( | 250 prefs->RegisterDoublePref( |
| 251 prefs::kTouchScreenFlingAccelerationAdjustment, | 251 prefs::kTouchScreenFlingAccelerationAdjustment, |
| 252 GestureConfiguration::touchscreen_fling_acceleration_adjustment(), | 252 GestureConfiguration::touchscreen_fling_acceleration_adjustment(), |
| 253 PrefService::UNSYNCABLE_PREF); | 253 PrefService::UNSYNCABLE_PREF); |
| 254 } | 254 } |
| 255 | 255 |
| 256 bool GesturePrefsObserverFactoryAura::ServiceIsCreatedWithProfile() { | 256 bool GesturePrefsObserverFactoryAura::ServiceIsCreatedWithProfile() const { |
| 257 // Create the observer as soon as the profile is created. | 257 // Create the observer as soon as the profile is created. |
| 258 return true; | 258 return true; |
| 259 } | 259 } |
| 260 | 260 |
| 261 bool GesturePrefsObserverFactoryAura::ServiceRedirectedInIncognito() { | 261 bool GesturePrefsObserverFactoryAura::ServiceRedirectedInIncognito() const { |
| 262 // Use same gesture preferences on incognito windows. | 262 // Use same gesture preferences on incognito windows. |
| 263 return true; | 263 return true; |
| 264 } | 264 } |
| 265 | 265 |
| 266 bool GesturePrefsObserverFactoryAura::ServiceIsNULLWhileTesting() { | 266 bool GesturePrefsObserverFactoryAura::ServiceIsNULLWhileTesting() const { |
| 267 // Some tests replace the PrefService of the TestingProfile after the | 267 // Some tests replace the PrefService of the TestingProfile after the |
| 268 // GesturePrefsObserver has been created, which makes Shutdown() | 268 // GesturePrefsObserver has been created, which makes Shutdown() |
| 269 // remove the registrar from a non-existent PrefService. | 269 // remove the registrar from a non-existent PrefService. |
| 270 return true; | 270 return true; |
| 271 } | 271 } |
| OLD | NEW |