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_FONT_HANDLER_H_ |
| 6 #define CHROME_BROWSER_UI_WEBUI_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 FontHandler : public SettingsPageUIHandler { |
| 25 public: |
| 26 explicit FontHandler(content::WebUI* webui); |
| 27 ~FontHandler() 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<FontHandler> weak_ptr_factory_; |
| 40 |
| 41 DISALLOW_COPY_AND_ASSIGN(FontHandler); |
| 42 }; |
| 43 |
| 44 } // namespace settings |
| 45 |
| 46 #endif // CHROME_BROWSER_UI_WEBUI_SETTINGS_FONT_HANDLER_H_ |
OLD | NEW |