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

Unified Diff: chrome/browser/ui/webui/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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/ui/webui/settings/font_handler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/settings/font_handler.h
diff --git a/chrome/browser/ui/webui/settings/font_handler.h b/chrome/browser/ui/webui/settings/font_handler.h
new file mode 100644
index 0000000000000000000000000000000000000000..6da85cb88ac9c1e339024cec4b20a4d647c12ef0
--- /dev/null
+++ b/chrome/browser/ui/webui/settings/font_handler.h
@@ -0,0 +1,46 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_UI_WEBUI_SETTINGS_FONT_HANDLER_H_
+#define CHROME_BROWSER_UI_WEBUI_SETTINGS_FONT_HANDLER_H_
+
+#include "base/macros.h"
+#include "base/memory/scoped_ptr.h"
+#include "base/memory/weak_ptr.h"
+#include "chrome/browser/ui/webui/settings/md_settings_ui.h"
+
+namespace base {
+class ListValue;
+}
+
+namespace content {
+class WebUI;
+}
+
+namespace settings {
+
+// Handle OS font list, font preference settings and character encoding.
+class FontHandler : public SettingsPageUIHandler {
+ public:
+ explicit FontHandler(content::WebUI* webui);
+ ~FontHandler() override;
+
+ // SettingsPageUIHandler implementation.
+ void RegisterMessages() override;
+
+ private:
+ // Handler for script asking for font information.
+ void HandleFetchFontsData(const base::ListValue* args);
+
+ // Callback to handle fonts loading.
+ void FontListHasLoaded(scoped_ptr<base::ListValue> list);
+
+ base::WeakPtrFactory<FontHandler> weak_ptr_factory_;
+
+ DISALLOW_COPY_AND_ASSIGN(FontHandler);
+};
+
+} // namespace settings
+
+#endif // CHROME_BROWSER_UI_WEBUI_SETTINGS_FONT_HANDLER_H_
« no previous file with comments | « no previous file | chrome/browser/ui/webui/settings/font_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698