Index: chrome/browser/accessibility/font_size_prefs.h |
diff --git a/chrome/browser/accessibility/font_size_prefs.h b/chrome/browser/accessibility/font_size_prefs.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..fdfee232b6dc263d27bc80eff392fa417f843853 |
--- /dev/null |
+++ b/chrome/browser/accessibility/font_size_prefs.h |
@@ -0,0 +1,49 @@ |
+// Copyright (c) 2014 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef CHROME_BROWSER_ACCESSIBILITY_FONT_SIZE_PREFS_H_ |
+#define CHROME_BROWSER_ACCESSIBILITY_FONT_SIZE_PREFS_H_ |
+ |
+#include "base/observer_list.h" |
+ |
+class PrefChangeRegistrar; |
+class PrefService; |
+class Profile; |
+ |
+class FontSizePrefs { |
+ public: |
+ class Observer { |
+ public: |
+ virtual void OnChangeFontSize(float font) = 0; |
+ virtual void OnChangeForceEnableZoom(bool enabled) = 0; |
+ }; |
+ |
+ explicit FontSizePrefs(Profile* profile); |
+ ~FontSizePrefs(); |
+ void Destroy(); |
+ |
+ // Sets the font scale factor. |
+ void SetFontScaleFactor(float font); |
+ float GetFontScaleFactor(); |
+ // Callback for FontScaleFactor changes from pref change registrar. |
+ 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
|
+ |
+ // Sets Force Enable Zoom. |
+ void SetForceEnableZoom(bool enabled); |
+ bool GetForceEnableZoom(); |
+ // Callback for ForceEnableZoom changes from pref change registrar. |
+ void OnForceEnableZoomPrefsChanged(); |
+ |
+ void AddObserver(Observer* obs); |
+ void RemoveObserver(Observer* obs); |
+ |
+ private: |
+ scoped_ptr<PrefChangeRegistrar> pref_change_registrar_; |
+ PrefService* pref_service_; |
+ ObserverList<Observer> observers_; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(FontSizePrefs); |
+}; |
+ |
+#endif // CHROME_BROWSER_ACCESSIBILITY_FONT_SIZE_PREFS_H_ |