Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(412)

Unified Diff: components/dom_distiller/core/distilled_page_prefs.h

Issue 1225183002: Font size in DomDistiller prefs syncs with local scaling (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: keep focus when useFontScaling() is called, add tests Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: components/dom_distiller/core/distilled_page_prefs.h
diff --git a/components/dom_distiller/core/distilled_page_prefs.h b/components/dom_distiller/core/distilled_page_prefs.h
index 22b1327842f1b40456ea7e034ab24ce43aeb1441..f142dc7c7ab613bf47ca256d27e8c6ee69095f09 100644
--- a/components/dom_distiller/core/distilled_page_prefs.h
+++ b/components/dom_distiller/core/distilled_page_prefs.h
@@ -38,6 +38,7 @@ class DistilledPagePrefs {
public:
virtual void OnChangeFontFamily(FontFamily font) = 0;
virtual void OnChangeTheme(Theme theme) = 0;
+ virtual void OnChangeFontScaling(float scaling) = 0;
};
explicit DistilledPagePrefs(PrefService* pref_service);
@@ -55,6 +56,11 @@ class DistilledPagePrefs {
// Returns the user's preference for the theme of distilled pages.
Theme GetTheme();
+ // Sets the user's preference for the font size scaling of distilled pages.
+ void SetFontScaling(float scaling);
+ // Returns the user's preference for the font size scaling of distilled pages.
+ float GetFontScaling();
+
void AddObserver(Observer* obs);
void RemoveObserver(Observer* obs);
@@ -63,6 +69,9 @@ class DistilledPagePrefs {
void NotifyOnChangeFontFamily(FontFamily font_family);
// Notifies all Observers of new theme.
void NotifyOnChangeTheme(Theme theme);
+ // Notifies all Observers of new font scaling.
+ void NotifyOnChangeFontScaling(float scaling);
+
PrefService* pref_service_;
base::ObserverList<Observer> observers_;

Powered by Google App Engine
This is Rietveld 408576698