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 // Callback for FontScaleFactor changes from pref change registrar. | |
| 30 void OnFontScaleFactorPrefsChanged(); | |
|
robliao
2014/07/25 16:49:19
These feel like they should be in a separate obser
sunangel
2014/07/25 19:22:56
Made them private instead.
Is the spacing okay be
| |
| 31 | |
| 32 // Sets Force Enable Zoom. | |
| 33 void SetForceEnableZoom(bool enabled); | |
| 34 bool GetForceEnableZoom(); | |
| 35 // Callback for ForceEnableZoom changes from pref change registrar. | |
| 36 void OnForceEnableZoomPrefsChanged(); | |
| 37 | |
| 38 void AddObserver(Observer* obs); | |
| 39 void RemoveObserver(Observer* obs); | |
| 40 | |
| 41 private: | |
| 42 scoped_ptr<PrefChangeRegistrar> pref_change_registrar_; | |
| 43 PrefService* pref_service_; | |
| 44 ObserverList<Observer> observers_; | |
| 45 | |
| 46 DISALLOW_COPY_AND_ASSIGN(FontSizePrefs); | |
| 47 }; | |
| 48 | |
| 49 #endif // CHROME_BROWSER_ACCESSIBILITY_FONT_SIZE_PREFS_H_ | |
| OLD | NEW |