Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright (c) 2014 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef CHROME_BROWSER_ACCESSIBILITY_FONT_SIZE_PREFS_H_ | |
| 6 #define CHROME_BROWSER_ACCESSIBILITY_FONT_SIZE_PREFS_H_ | |
| 7 | |
| 8 #include "base/observer_list.h" | |
| 9 | |
| 10 class PrefChangeRegistrar; | |
| 11 class PrefService; | |
| 12 class Profile; | |
| 13 | |
| 14 class FontSizePrefs { | |
| 15 public: | |
| 16 class Observer { | |
| 17 public: | |
| 18 virtual void OnChangeFontSize(float font) = 0; | |
| 19 virtual void OnChangeForceEnableZoom(bool enabled) = 0; | |
| 20 }; | |
| 21 | |
| 22 explicit FontSizePrefs(Profile* profile); | |
| 23 ~FontSizePrefs(); | |
| 24 void Destroy(); | |
| 25 | |
| 26 // Sets the font scale factor. | |
| 27 void SetFontScaleFactor(float font); | |
| 28 float GetFontScaleFactor(); | |
| 29 | |
| 30 // Sets Force Enable Zoom. | |
| 31 void SetForceEnableZoom(bool enabled); | |
| 32 bool GetForceEnableZoom(); | |
| 33 | |
| 34 void AddObserver(Observer* obs); | |
| 35 void RemoveObserver(Observer* obs); | |
| 36 | |
| 37 private: | |
| 38 scoped_ptr<PrefChangeRegistrar> pref_change_registrar_; | |
|
robliao
2014/07/25 23:49:34
Declaration order - These go last, but before the
sunangel
2014/07/28 21:17:20
Done.
| |
| 39 PrefService* pref_service_; | |
| 40 ObserverList<Observer> observers_; | |
| 41 | |
| 42 // Callback for FontScaleFactor changes from pref change registrar. | |
| 43 void OnFontScaleFactorPrefsChanged(); | |
| 44 // Callback for ForceEnableZoom changes from pref change registrar. | |
| 45 void OnForceEnableZoomPrefsChanged(); | |
| 46 | |
| 47 DISALLOW_COPY_AND_ASSIGN(FontSizePrefs); | |
| 48 }; | |
| 49 | |
| 50 #endif // CHROME_BROWSER_ACCESSIBILITY_FONT_SIZE_PREFS_H_ | |
| OLD | NEW |