OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2015 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_SETTINGS_SETTINGS_FONT_HANDLER_H_ | |
6 #define CHROME_BROWSER_UI_WEBUI_SETTINGS_SETTINGS_FONT_HANDLER_H_ | |
7 | |
Dan Beam
2015/10/15 02:34:41
#include "base/macros.h"
i'm gonna write a presub
dschuyler
2015/10/15 21:54:20
Done.
Dan Beam
2015/10/15 23:33:17
also Done: https://codereview.chromium.org/1411553
dschuyler
2015/10/24 01:03:48
Acknowledged.
| |
8 #include "base/memory/scoped_ptr.h" | |
9 #include "base/prefs/pref_member.h" | |
10 #include "chrome/browser/ui/webui/settings/md_settings_ui.h" | |
11 | |
12 namespace base { | |
13 class ListValue; | |
14 } | |
15 | |
16 namespace content { | |
17 class WebUI; | |
18 } | |
19 | |
20 namespace settings { | |
21 | |
22 // Handle OS font list, font preference settings and character encoding. | |
23 class SettingsFontHandler : public SettingsPageUIHandler { | |
24 public: | |
25 explicit SettingsFontHandler(content::WebUI* webui); | |
26 ~SettingsFontHandler() override; | |
27 | |
28 // SettingsPageUIHandler implementation. | |
29 void RegisterMessages() override; | |
30 | |
31 private: | |
32 // Handler for script asking for font information. | |
33 void HandleFetchFontsData(const base::ListValue* args); | |
34 | |
35 // Callback to handle fonts loading. | |
36 void FontListHasLoaded(scoped_ptr<base::ListValue> list); | |
37 | |
38 // Values used to update current settings when lists load. | |
39 StringPrefMember standard_font_; | |
40 StringPrefMember serif_font_; | |
41 StringPrefMember sans_serif_font_; | |
42 StringPrefMember fixed_font_; | |
43 StringPrefMember font_encoding_; | |
44 | |
45 DISALLOW_COPY_AND_ASSIGN(SettingsFontHandler); | |
46 }; | |
47 | |
48 } // namespace settings | |
49 | |
50 #endif // CHROME_BROWSER_UI_WEBUI_SETTINGS_SETTINGS_FONT_HANDLER_H_ | |
OLD | NEW |