Index: chrome/browser/extensions/extension_font_settings_api.h |
diff --git a/chrome/browser/extensions/extension_font_settings_api.h b/chrome/browser/extensions/extension_font_settings_api.h |
index 49776f2d0c558e4e74c9499431fc9d4b94a448e4..27aeb8614cbf6c5acc612f4a437d021e0a30138a 100644 |
--- a/chrome/browser/extensions/extension_font_settings_api.h |
+++ b/chrome/browser/extensions/extension_font_settings_api.h |
@@ -30,18 +30,76 @@ class GetFontListFunction : public AsyncExtensionFunction { |
bool CopyFontsToResult(base::ListValue* fonts); |
}; |
-class GetDefaultFontSizeFunction : public SyncExtensionFunction { |
- public: |
+// Base class for functions that get a font size. |
+class GetFontSizeExtensionFunction : public SyncExtensionFunction { |
+ protected: |
+ virtual bool RunImpl() OVERRIDE; |
+ |
+ // Implementations should return the name of the font size preference to get. |
+ virtual const char* GetPrefName() = 0; |
+}; |
+ |
+// Base class for functions that set a font size. |
+class SetFontSizeExtensionFunction : public SyncExtensionFunction { |
+ protected: |
virtual bool RunImpl() OVERRIDE; |
+ |
+ // Implementations should return the name of the font size preference to set. |
+ virtual const char* GetPrefName() = 0; |
+}; |
+ |
+class GetDefaultFontSizeFunction : public GetFontSizeExtensionFunction { |
+ public: |
DECLARE_EXTENSION_FUNCTION_NAME( |
"experimental.fontSettings.getDefaultFontSize") |
+ |
+ protected: |
+ virtual const char* GetPrefName() OVERRIDE; |
}; |
-class SetDefaultFontSizeFunction : public SyncExtensionFunction { |
+class SetDefaultFontSizeFunction : public SetFontSizeExtensionFunction { |
public: |
- virtual bool RunImpl() OVERRIDE; |
DECLARE_EXTENSION_FUNCTION_NAME( |
"experimental.fontSettings.setDefaultFontSize") |
+ |
+ protected: |
+ virtual const char* GetPrefName() OVERRIDE; |
+}; |
+ |
+class GetDefaultFixedFontSizeFunction : public GetFontSizeExtensionFunction { |
+ public: |
+ DECLARE_EXTENSION_FUNCTION_NAME( |
+ "experimental.fontSettings.getDefaultFixedFontSize") |
+ |
+ protected: |
+ virtual const char* GetPrefName() OVERRIDE; |
+}; |
+ |
+class SetDefaultFixedFontSizeFunction : public SetFontSizeExtensionFunction { |
+ public: |
+ DECLARE_EXTENSION_FUNCTION_NAME( |
+ "experimental.fontSettings.setDefaultFixedFontSize") |
+ |
+ protected: |
+ virtual const char* GetPrefName() OVERRIDE; |
+}; |
+ |
+class GetMinimumFontSizeFunction : public GetFontSizeExtensionFunction { |
+ public: |
+ DECLARE_EXTENSION_FUNCTION_NAME( |
+ "experimental.fontSettings.getMinimumFontSize") |
+ |
+ protected: |
+ virtual const char* GetPrefName() OVERRIDE; |
+}; |
+ |
+class SetMinimumFontSizeFunction : public SetFontSizeExtensionFunction { |
+ public: |
+ DECLARE_EXTENSION_FUNCTION_NAME( |
+ "experimental.fontSettings.setMinimumFontSize") |
+ |
+ protected: |
+ virtual const char* GetPrefName() OVERRIDE; |
}; |
#endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_FONT_SETTINGS_API_H__ |