OLD | NEW |
| (Empty) |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef CHROME_BROWSER_UI_WEBUI_OPTIONS2_FONT_SETTINGS_HANDLER_H_ | |
6 #define CHROME_BROWSER_UI_WEBUI_OPTIONS2_FONT_SETTINGS_HANDLER_H_ | |
7 | |
8 #include "base/memory/scoped_ptr.h" | |
9 #include "chrome/browser/prefs/pref_member.h" | |
10 #include "chrome/browser/ui/webui/options2/options_ui.h" | |
11 | |
12 namespace base { | |
13 class ListValue; | |
14 } | |
15 | |
16 namespace options { | |
17 | |
18 // Font settings overlay page UI handler. | |
19 class FontSettingsHandler : public OptionsPageUIHandler { | |
20 public: | |
21 FontSettingsHandler(); | |
22 virtual ~FontSettingsHandler(); | |
23 | |
24 // OptionsPageUIHandler implementation. | |
25 virtual void GetLocalizedValues(DictionaryValue* localized_strings) OVERRIDE; | |
26 virtual void InitializePage() OVERRIDE; | |
27 | |
28 // WebUIMessageHandler implementation. | |
29 virtual void RegisterMessages() OVERRIDE; | |
30 | |
31 // content::NotificationObserver implementation. | |
32 virtual void Observe(int type, | |
33 const content::NotificationSource& source, | |
34 const content::NotificationDetails& details) OVERRIDE; | |
35 | |
36 private: | |
37 void HandleFetchFontsData(const ListValue* args); | |
38 | |
39 void FontsListHasLoaded(scoped_ptr<base::ListValue> list); | |
40 | |
41 void SetUpStandardFontSample(); | |
42 void SetUpSerifFontSample(); | |
43 void SetUpSansSerifFontSample(); | |
44 void SetUpFixedFontSample(); | |
45 void SetUpMinimumFontSample(); | |
46 | |
47 StringPrefMember standard_font_; | |
48 StringPrefMember serif_font_; | |
49 StringPrefMember sans_serif_font_; | |
50 StringPrefMember fixed_font_; | |
51 StringPrefMember font_encoding_; | |
52 IntegerPrefMember default_font_size_; | |
53 IntegerPrefMember default_fixed_font_size_; | |
54 IntegerPrefMember minimum_font_size_; | |
55 | |
56 DISALLOW_COPY_AND_ASSIGN(FontSettingsHandler); | |
57 }; | |
58 | |
59 } // namespace options | |
60 | |
61 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS2_FONT_SETTINGS_HANDLER_H_ | |
OLD | NEW |