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

Side by Side Diff: chrome/browser/ui/webui/settings/settings_font_handler.h

Issue 1405453002: [MD settings] adding c++ side of font settings (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review changes Created 5 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
OLDNEW
(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
8 #include "base/macros.h"
9 #include "base/memory/scoped_ptr.h"
10 #include "base/memory/weak_ptr.h"
11 #include "chrome/browser/ui/webui/settings/md_settings_ui.h"
12
13 namespace base {
14 class ListValue;
15 }
16
17 namespace content {
18 class WebUI;
19 }
20
21 namespace settings {
22
23 // Handle OS font list, font preference settings and character encoding.
24 class SettingsFontHandler : public SettingsPageUIHandler {
Dan Beam 2015/10/24 01:19:47 out of curiosity, why SettingsFontHandler instead
dschuyler 2015/10/26 15:54:33 I'd like the file name to match. I can change bot
25 public:
26 explicit SettingsFontHandler(content::WebUI* webui);
27 ~SettingsFontHandler() override;
28
29 // SettingsPageUIHandler implementation.
30 void RegisterMessages() override;
31
32 private:
33 // Handler for script asking for font information.
34 void HandleFetchFontsData(const base::ListValue* args);
35
36 // Callback to handle fonts loading.
37 void FontListHasLoaded(scoped_ptr<base::ListValue> list);
38
39 base::WeakPtrFactory<SettingsFontHandler> weak_ptr_factory_;
40
41 DISALLOW_COPY_AND_ASSIGN(SettingsFontHandler);
42 };
43
44 } // namespace settings
45
46 #endif // CHROME_BROWSER_UI_WEBUI_SETTINGS_SETTINGS_FONT_HANDLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698