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