| 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 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 176 service->Notify(chrome::NOTIFICATION_BROWSER_FLING_CURVE_PARAMETERS_CHANGED, | 176 service->Notify(chrome::NOTIFICATION_BROWSER_FLING_CURVE_PARAMETERS_CHANGED, |
| 177 content::Source<GesturePrefsObserver>(this), | 177 content::Source<GesturePrefsObserver>(this), |
| 178 content::NotificationService::NoDetails()); | 178 content::NotificationService::NoDetails()); |
| 179 } | 179 } |
| 180 | 180 |
| 181 } // namespace | 181 } // namespace |
| 182 | 182 |
| 183 // static | 183 // static |
| 184 GesturePrefsObserverFactoryAura* | 184 GesturePrefsObserverFactoryAura* |
| 185 GesturePrefsObserverFactoryAura::GetInstance() { | 185 GesturePrefsObserverFactoryAura::GetInstance() { |
| 186 return Singleton<GesturePrefsObserverFactoryAura>::get(); | 186 return base::Singleton<GesturePrefsObserverFactoryAura>::get(); |
| 187 } | 187 } |
| 188 | 188 |
| 189 GesturePrefsObserverFactoryAura::GesturePrefsObserverFactoryAura() | 189 GesturePrefsObserverFactoryAura::GesturePrefsObserverFactoryAura() |
| 190 : BrowserContextKeyedServiceFactory( | 190 : BrowserContextKeyedServiceFactory( |
| 191 "GesturePrefsObserverAura", | 191 "GesturePrefsObserverAura", |
| 192 BrowserContextDependencyManager::GetInstance()) {} | 192 BrowserContextDependencyManager::GetInstance()) {} |
| 193 | 193 |
| 194 GesturePrefsObserverFactoryAura::~GesturePrefsObserverFactoryAura() {} | 194 GesturePrefsObserverFactoryAura::~GesturePrefsObserverFactoryAura() {} |
| 195 | 195 |
| 196 KeyedService* GesturePrefsObserverFactoryAura::BuildServiceInstanceFor( | 196 KeyedService* GesturePrefsObserverFactoryAura::BuildServiceInstanceFor( |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 240 // Use same gesture preferences on incognito windows. | 240 // Use same gesture preferences on incognito windows. |
| 241 return chrome::GetBrowserContextRedirectedInIncognito(context); | 241 return chrome::GetBrowserContextRedirectedInIncognito(context); |
| 242 } | 242 } |
| 243 | 243 |
| 244 bool GesturePrefsObserverFactoryAura::ServiceIsNULLWhileTesting() const { | 244 bool GesturePrefsObserverFactoryAura::ServiceIsNULLWhileTesting() const { |
| 245 // Some tests replace the PrefService of the TestingProfile after the | 245 // Some tests replace the PrefService of the TestingProfile after the |
| 246 // GesturePrefsObserver has been created, which makes Shutdown() | 246 // GesturePrefsObserver has been created, which makes Shutdown() |
| 247 // remove the registrar from a non-existent PrefService. | 247 // remove the registrar from a non-existent PrefService. |
| 248 return true; | 248 return true; |
| 249 } | 249 } |
| OLD | NEW |