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

Side by Side Diff: chrome/browser/ui/webui/options/font_settings_handler.h

Issue 9500008: Move font_list_async.h to content/public. Switch to Pass() goodness to simplify code. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix clang Created 8 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/DEPS ('k') | chrome/browser/ui/webui/options/font_settings_handler.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_UI_WEBUI_OPTIONS_FONT_SETTINGS_HANDLER_H_ 5 #ifndef CHROME_BROWSER_UI_WEBUI_OPTIONS_FONT_SETTINGS_HANDLER_H_
6 #define CHROME_BROWSER_UI_WEBUI_OPTIONS_FONT_SETTINGS_HANDLER_H_ 6 #define CHROME_BROWSER_UI_WEBUI_OPTIONS_FONT_SETTINGS_HANDLER_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/memory/scoped_ptr.h"
9 #include "chrome/browser/prefs/pref_member.h" 10 #include "chrome/browser/prefs/pref_member.h"
10 #include "chrome/browser/ui/webui/options/options_ui.h" 11 #include "chrome/browser/ui/webui/options/options_ui.h"
11 #include "content/browser/font_list_async.h" 12
13 namespace base {
14 class ListValue;
15 }
12 16
13 // Font settings overlay page UI handler. 17 // Font settings overlay page UI handler.
14 class FontSettingsHandler : public OptionsPageUIHandler { 18 class FontSettingsHandler : public OptionsPageUIHandler {
15 public: 19 public:
16 FontSettingsHandler(); 20 FontSettingsHandler();
17 virtual ~FontSettingsHandler(); 21 virtual ~FontSettingsHandler();
18 22
19 // OptionsPageUIHandler implementation. 23 // OptionsPageUIHandler implementation.
20 virtual void GetLocalizedValues(DictionaryValue* localized_strings) OVERRIDE; 24 virtual void GetLocalizedValues(DictionaryValue* localized_strings) OVERRIDE;
21 virtual void Initialize() OVERRIDE; 25 virtual void Initialize() OVERRIDE;
22 26
23 // WebUIMessageHandler implementation. 27 // WebUIMessageHandler implementation.
24 virtual void RegisterMessages() OVERRIDE; 28 virtual void RegisterMessages() OVERRIDE;
25 29
26 // content::NotificationObserver implementation. 30 // content::NotificationObserver implementation.
27 virtual void Observe(int type, 31 virtual void Observe(int type,
28 const content::NotificationSource& source, 32 const content::NotificationSource& source,
29 const content::NotificationDetails& details) OVERRIDE; 33 const content::NotificationDetails& details) OVERRIDE;
30 34
31 private: 35 private:
32 void HandleFetchFontsData(const ListValue* args); 36 void HandleFetchFontsData(const ListValue* args);
33 37
34 void FontsListHasLoaded(scoped_refptr<content::FontListResult> list); 38 void FontsListHasLoaded(scoped_ptr<base::ListValue> list);
35 39
36 void SetUpStandardFontSample(); 40 void SetUpStandardFontSample();
37 void SetUpSerifFontSample(); 41 void SetUpSerifFontSample();
38 void SetUpSansSerifFontSample(); 42 void SetUpSansSerifFontSample();
39 void SetUpFixedFontSample(); 43 void SetUpFixedFontSample();
40 void SetUpMinimumFontSample(); 44 void SetUpMinimumFontSample();
41 45
42 StringPrefMember standard_font_; 46 StringPrefMember standard_font_;
43 StringPrefMember serif_font_; 47 StringPrefMember serif_font_;
44 StringPrefMember sans_serif_font_; 48 StringPrefMember sans_serif_font_;
45 StringPrefMember fixed_font_; 49 StringPrefMember fixed_font_;
46 StringPrefMember font_encoding_; 50 StringPrefMember font_encoding_;
47 IntegerPrefMember default_font_size_; 51 IntegerPrefMember default_font_size_;
48 IntegerPrefMember default_fixed_font_size_; 52 IntegerPrefMember default_fixed_font_size_;
49 IntegerPrefMember minimum_font_size_; 53 IntegerPrefMember minimum_font_size_;
50 54
51 DISALLOW_COPY_AND_ASSIGN(FontSettingsHandler); 55 DISALLOW_COPY_AND_ASSIGN(FontSettingsHandler);
52 }; 56 };
53 57
54 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_FONT_SETTINGS_HANDLER_H_ 58 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_FONT_SETTINGS_HANDLER_H_
OLDNEW
« no previous file with comments | « chrome/browser/DEPS ('k') | chrome/browser/ui/webui/options/font_settings_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698