Chromium Code Reviews| 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..0fb8f3928152ceaa75677cb0eefdf175afd96809 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* pref_name() = 0; |
|
Matt Perry
2012/03/26 18:53:05
underscore_style() is reserved for inline methods.
falken
2012/03/27 02:26:01
Done.
|
| +}; |
| + |
| +// 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* pref_name() = 0; |
| +}; |
| + |
| +class GetDefaultFontSizeFunction : public GetFontSizeExtensionFunction { |
| + public: |
| DECLARE_EXTENSION_FUNCTION_NAME( |
| "experimental.fontSettings.getDefaultFontSize") |
| + |
| + protected: |
| + virtual const char* pref_name() 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* pref_name() OVERRIDE; |
| +}; |
| + |
| +class GetDefaultFixedFontSizeFunction : public GetFontSizeExtensionFunction { |
| + public: |
| + DECLARE_EXTENSION_FUNCTION_NAME( |
| + "experimental.fontSettings.getDefaultFixedFontSize") |
| + |
| + protected: |
| + virtual const char* pref_name() OVERRIDE; |
| +}; |
| + |
| +class SetDefaultFixedFontSizeFunction : public SetFontSizeExtensionFunction { |
| + public: |
| + DECLARE_EXTENSION_FUNCTION_NAME( |
| + "experimental.fontSettings.setDefaultFixedFontSize") |
| + |
| + protected: |
| + virtual const char* pref_name() OVERRIDE; |
| +}; |
| + |
| +class GetMinimumFontSizeFunction : public GetFontSizeExtensionFunction { |
| + public: |
| + DECLARE_EXTENSION_FUNCTION_NAME( |
| + "experimental.fontSettings.getMinimumFontSize") |
| + |
| + protected: |
| + virtual const char* pref_name() OVERRIDE; |
| +}; |
| + |
| +class SetMinimumFontSizeFunction : public SetFontSizeExtensionFunction { |
| + public: |
| + DECLARE_EXTENSION_FUNCTION_NAME( |
| + "experimental.fontSettings.setMinimumFontSize") |
| + |
| + protected: |
| + virtual const char* pref_name() OVERRIDE; |
| }; |
| #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_FONT_SETTINGS_API_H__ |