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

Side by Side 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: rm uneeded include 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_UI_WEBUI_OPTIONS_FONT_SETTINGS_HANDLER_H_ 5 #ifndef CHROME_BROWSER_UI_WEBUI_OPTIONS_FONT_SETTINGS_HANDLER_H_
6 #define CHROME_BROWSER_UI_WEBUI_OPTIONS_FONT_SETTINGS_HANDLER_H_ 6 #define CHROME_BROWSER_UI_WEBUI_OPTIONS_FONT_SETTINGS_HANDLER_H_
7 7
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/prefs/pref_member.h" 9 #include "base/prefs/pref_member.h"
10 #include "chrome/browser/ui/webui/options/options_ui.h" 10 #include "chrome/browser/ui/webui/options/options_ui.h"
Dan Beam 2013/10/23 18:04:00 IWYU: #include "content/public/browser/notificatio
falken 2013/10/24 12:09:41 Done.
11 11
12 namespace base { 12 namespace base {
13 class ListValue; 13 class ListValue;
14 } 14 }
15 15
16 namespace extensions {
17 class Extension;
18 }
19
16 namespace options { 20 namespace options {
17 21
18 // Font settings overlay page UI handler. 22 // Font settings overlay page UI handler.
19 class FontSettingsHandler : public OptionsPageUIHandler { 23 class FontSettingsHandler : public OptionsPageUIHandler {
20 public: 24 public:
21 FontSettingsHandler(); 25 FontSettingsHandler();
22 virtual ~FontSettingsHandler(); 26 virtual ~FontSettingsHandler();
23 27
24 // OptionsPageUIHandler implementation. 28 // OptionsPageUIHandler implementation.
25 virtual void GetLocalizedValues(DictionaryValue* localized_strings) OVERRIDE; 29 virtual void GetLocalizedValues(DictionaryValue* localized_strings) OVERRIDE;
30 virtual void InitializeHandler() OVERRIDE;
26 virtual void InitializePage() OVERRIDE; 31 virtual void InitializePage() OVERRIDE;
27 32
28 // WebUIMessageHandler implementation. 33 // WebUIMessageHandler implementation.
29 virtual void RegisterMessages() OVERRIDE; 34 virtual void RegisterMessages() OVERRIDE;
30 35
31 private: 36 private:
37 // content::NotificationObserver (from OptionsPageUIHandler) implementation
Dan Beam 2013/10/23 18:04:00 // OptionsPageUIHandler implementation.
falken 2013/10/24 12:09:41 Done.
38 virtual void Observe(int type,
39 const content::NotificationSource& source,
40 const content::NotificationDetails& details) OVERRIDE;
41
32 void HandleFetchFontsData(const ListValue* args); 42 void HandleFetchFontsData(const ListValue* args);
33 43
34 void FontsListHasLoaded(scoped_ptr<base::ListValue> list); 44 void FontsListHasLoaded(scoped_ptr<base::ListValue> list);
35 45
36 void SetUpStandardFontSample(); 46 void SetUpStandardFontSample();
37 void SetUpSerifFontSample(); 47 void SetUpSerifFontSample();
38 void SetUpSansSerifFontSample(); 48 void SetUpSansSerifFontSample();
39 void SetUpFixedFontSample(); 49 void SetUpFixedFontSample();
40 void SetUpMinimumFontSample(); 50 void SetUpMinimumFontSample();
51
Dan Beam 2013/10/23 18:04:00 though the rest of this class is lacking in docume
falken 2013/10/24 12:09:41 Done.
52 const extensions::Extension* GetAdvancedFontSettingsExtension();
53 void NotifyAdvancedFontSettingsAvailability();
54 void OpenAdvancedFontSettingsOptions(const base::ListValue* args);
55
41 void OnWebKitDefaultFontSizeChanged(); 56 void OnWebKitDefaultFontSizeChanged();
42 57
43 StringPrefMember standard_font_; 58 StringPrefMember standard_font_;
44 StringPrefMember serif_font_; 59 StringPrefMember serif_font_;
45 StringPrefMember sans_serif_font_; 60 StringPrefMember sans_serif_font_;
46 StringPrefMember fixed_font_; 61 StringPrefMember fixed_font_;
47 StringPrefMember font_encoding_; 62 StringPrefMember font_encoding_;
48 IntegerPrefMember default_font_size_; 63 IntegerPrefMember default_font_size_;
49 IntegerPrefMember default_fixed_font_size_; 64 IntegerPrefMember default_fixed_font_size_;
50 IntegerPrefMember minimum_font_size_; 65 IntegerPrefMember minimum_font_size_;
51 66
67 content::NotificationRegistrar registrar_;
68
52 DISALLOW_COPY_AND_ASSIGN(FontSettingsHandler); 69 DISALLOW_COPY_AND_ASSIGN(FontSettingsHandler);
53 }; 70 };
54 71
55 } // namespace options 72 } // namespace options
56 73
57 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_FONT_SETTINGS_HANDLER_H_ 74 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_FONT_SETTINGS_HANDLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698