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

Unified Diff: chrome/browser/ui/webui/options/font_settings_handler.h

Issue 33753004: Add link to the Advanced Font Settings extension in Font Settings (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review comments Created 7 years, 2 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: chrome/browser/ui/webui/options/font_settings_handler.h
diff --git a/chrome/browser/ui/webui/options/font_settings_handler.h b/chrome/browser/ui/webui/options/font_settings_handler.h
index 32ca8c49d2a37ff1fd5b573931b3532e561a56b9..5a533aaceca5ce1f30c99f9917ea8b6f2a4c72ba 100644
--- a/chrome/browser/ui/webui/options/font_settings_handler.h
+++ b/chrome/browser/ui/webui/options/font_settings_handler.h
@@ -8,11 +8,16 @@
#include "base/memory/scoped_ptr.h"
#include "base/prefs/pref_member.h"
#include "chrome/browser/ui/webui/options/options_ui.h"
+#include "content/public/browser/notification_registrar.h"
namespace base {
class ListValue;
}
+namespace extensions {
+class Extension;
+}
+
namespace options {
// Font settings overlay page UI handler.
@@ -23,12 +28,18 @@ class FontSettingsHandler : public OptionsPageUIHandler {
// OptionsPageUIHandler implementation.
virtual void GetLocalizedValues(DictionaryValue* localized_strings) OVERRIDE;
+ virtual void InitializeHandler() OVERRIDE;
virtual void InitializePage() OVERRIDE;
// WebUIMessageHandler implementation.
virtual void RegisterMessages() OVERRIDE;
private:
+ // OptionsPageUIHandler implementation.
+ virtual void Observe(int type,
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE;
+
void HandleFetchFontsData(const ListValue* args);
void FontsListHasLoaded(scoped_ptr<base::ListValue> list);
@@ -38,6 +49,16 @@ class FontSettingsHandler : public OptionsPageUIHandler {
void SetUpSansSerifFontSample();
void SetUpFixedFontSample();
void SetUpMinimumFontSample();
+
+ // Returns the Advanced Font Settings Extension if it's installed and enabled,
+ // or NULL otherwise.
+ const extensions::Extension* GetAdvancedFontSettingsExtension();
+ // Notifies the web UI about whether the Advanced Font Settings Extension is
+ // installed and enabled.
+ void NotifyAdvancedFontSettingsAvailability();
+ // Opens the options page of the Advanced Font Settings Extension.
+ void HandleOpenAdvancedFontSettingsOptions(const base::ListValue* args);
+
void OnWebKitDefaultFontSizeChanged();
StringPrefMember standard_font_;
@@ -49,6 +70,8 @@ class FontSettingsHandler : public OptionsPageUIHandler {
IntegerPrefMember default_fixed_font_size_;
IntegerPrefMember minimum_font_size_;
+ content::NotificationRegistrar registrar_;
+
DISALLOW_COPY_AND_ASSIGN(FontSettingsHandler);
};
« no previous file with comments | « chrome/browser/ui/webui/options/font_settings_browsertest.js ('k') | chrome/browser/ui/webui/options/font_settings_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698