| 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 5003c0b833cf8a03f6fb82d02eba9e907bb939cc..d60d20537981d27f3b50c79cdacfafbd56ba5519 100644
|
| --- a/chrome/browser/extensions/extension_font_settings_api.h
|
| +++ b/chrome/browser/extensions/extension_font_settings_api.h
|
| @@ -56,6 +56,12 @@ class ExtensionFontSettingsEventRouter : public content::NotificationObserver {
|
| DISALLOW_COPY_AND_ASSIGN(ExtensionFontSettingsEventRouter);
|
| };
|
|
|
| +class ClearFontFunction : public SyncExtensionFunction {
|
| + public:
|
| + virtual bool RunImpl() OVERRIDE;
|
| + DECLARE_EXTENSION_FUNCTION_NAME("experimental.fontSettings.clearFont")
|
| +};
|
| +
|
| class GetFontFunction : public SyncExtensionFunction {
|
| public:
|
| virtual bool RunImpl() OVERRIDE;
|
| @@ -78,6 +84,16 @@ class GetFontListFunction : public AsyncExtensionFunction {
|
| bool CopyFontsToResult(base::ListValue* fonts);
|
| };
|
|
|
| +// Base class for functions that clear a font pref.
|
| +class ClearFontPrefExtensionFunction : public SyncExtensionFunction {
|
| + protected:
|
| + virtual bool RunImpl() OVERRIDE;
|
| +
|
| + // Implementations should return the name of the preference to clear, like
|
| + // "webkit.webprefs.default_font_size".
|
| + virtual const char* GetPrefName() = 0;
|
| +};
|
| +
|
| // Base class for functions that get a font pref.
|
| class GetFontPrefExtensionFunction : public SyncExtensionFunction {
|
| protected:
|
| @@ -106,6 +122,15 @@ class SetFontPrefExtensionFunction : public SyncExtensionFunction {
|
| virtual const char* GetKey() = 0;
|
| };
|
|
|
| +class ClearDefaultFontSizeFunction : public ClearFontPrefExtensionFunction {
|
| + public:
|
| + DECLARE_EXTENSION_FUNCTION_NAME(
|
| + "experimental.fontSettings.clearDefaultFontSize")
|
| +
|
| + protected:
|
| + virtual const char* GetPrefName() OVERRIDE;
|
| +};
|
| +
|
| class GetDefaultFontSizeFunction : public GetFontPrefExtensionFunction {
|
| public:
|
| DECLARE_EXTENSION_FUNCTION_NAME(
|
| @@ -126,6 +151,16 @@ class SetDefaultFontSizeFunction : public SetFontPrefExtensionFunction {
|
| virtual const char* GetKey() OVERRIDE;
|
| };
|
|
|
| +class ClearDefaultFixedFontSizeFunction
|
| + : public ClearFontPrefExtensionFunction {
|
| + public:
|
| + DECLARE_EXTENSION_FUNCTION_NAME(
|
| + "experimental.fontSettings.clearDefaultFixedFontSize")
|
| +
|
| + protected:
|
| + virtual const char* GetPrefName() OVERRIDE;
|
| +};
|
| +
|
| class GetDefaultFixedFontSizeFunction : public GetFontPrefExtensionFunction {
|
| public:
|
| DECLARE_EXTENSION_FUNCTION_NAME(
|
| @@ -146,6 +181,15 @@ class SetDefaultFixedFontSizeFunction : public SetFontPrefExtensionFunction {
|
| virtual const char* GetKey() OVERRIDE;
|
| };
|
|
|
| +class ClearMinimumFontSizeFunction : public ClearFontPrefExtensionFunction {
|
| + public:
|
| + DECLARE_EXTENSION_FUNCTION_NAME(
|
| + "experimental.fontSettings.clearMinimumFontSize")
|
| +
|
| + protected:
|
| + virtual const char* GetPrefName() OVERRIDE;
|
| +};
|
| +
|
| class GetMinimumFontSizeFunction : public GetFontPrefExtensionFunction {
|
| public:
|
| DECLARE_EXTENSION_FUNCTION_NAME(
|
| @@ -166,6 +210,15 @@ class SetMinimumFontSizeFunction : public SetFontPrefExtensionFunction {
|
| virtual const char* GetKey() OVERRIDE;
|
| };
|
|
|
| +class ClearDefaultCharacterSetFunction : public ClearFontPrefExtensionFunction {
|
| + public:
|
| + DECLARE_EXTENSION_FUNCTION_NAME(
|
| + "experimental.fontSettings.clearDefaultCharacterSet")
|
| +
|
| + protected:
|
| + virtual const char* GetPrefName() OVERRIDE;
|
| +};
|
| +
|
| class GetDefaultCharacterSetFunction : public GetFontPrefExtensionFunction {
|
| public:
|
| DECLARE_EXTENSION_FUNCTION_NAME(
|
|
|