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

Unified Diff: ui/base/resource/resource_bundle.h

Issue 19666006: Supports FontList in Textfield. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Synced. Created 7 years, 5 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
Index: ui/base/resource/resource_bundle.h
diff --git a/ui/base/resource/resource_bundle.h b/ui/base/resource/resource_bundle.h
index d44c7db69fa9110d0c35b7b7b470efe446d541a6..5e41b3e483d9db1cb188e0003f146b7fdda318a7 100644
--- a/ui/base/resource/resource_bundle.h
+++ b/ui/base/resource/resource_bundle.h
@@ -20,7 +20,7 @@
#include "base/strings/string_piece.h"
#include "ui/base/layout.h"
#include "ui/base/ui_export.h"
-#include "ui/gfx/font.h"
+#include "ui/gfx/font_list.h"
#include "ui/gfx/image/image.h"
#include "ui/gfx/native_widget_types.h"
@@ -107,9 +107,9 @@ class UI_EXPORT ResourceBundle {
// false to attempt retrieval of the default string.
virtual bool GetLocalizedString(int message_id, string16* value) = 0;
- // Return a font resource or NULL to attempt retrieval of the default
+ // Returns a font list or NULL to attempt retrieval of the default
// resource.
- virtual scoped_ptr<gfx::Font> GetFont(FontStyle style) = 0;
+ virtual scoped_ptr<gfx::FontList> GetFontList(FontStyle style) = 0;
tony 2013/07/31 17:23:48 I would leave the delegate unchanged since we don'
Yuki 2013/08/01 07:49:30 Thanks for the advice. I've changed the code to k
Yuki 2013/08/01 13:50:01 I found that ResourceBundle is not exported by UI_
protected:
virtual ~Delegate() {}
@@ -233,6 +233,9 @@ class UI_EXPORT ResourceBundle {
// string if the message_id is not found.
string16 GetLocalizedString(int message_id);
+ // Returns the font list for the specified style.
+ const gfx::FontList& GetFontList(FontStyle style);
+
// Returns the font for the specified style.
const gfx::Font& GetFont(FontStyle style);
@@ -370,16 +373,17 @@ class UI_EXPORT ResourceBundle {
gfx::Image empty_image_;
- // The various fonts used. Cached to avoid repeated GDI creation/destruction.
- scoped_ptr<gfx::Font> base_font_;
- scoped_ptr<gfx::Font> bold_font_;
- scoped_ptr<gfx::Font> small_font_;
- scoped_ptr<gfx::Font> small_bold_font_;
- scoped_ptr<gfx::Font> medium_font_;
- scoped_ptr<gfx::Font> medium_bold_font_;
- scoped_ptr<gfx::Font> large_font_;
- scoped_ptr<gfx::Font> large_bold_font_;
- scoped_ptr<gfx::Font> web_font_;
+ // The various font lists used. Cached to avoid repeated GDI
+ // creation/destruction.
+ scoped_ptr<gfx::FontList> base_font_list_;
+ scoped_ptr<gfx::FontList> bold_font_list_;
+ scoped_ptr<gfx::FontList> small_font_list_;
+ scoped_ptr<gfx::FontList> small_bold_font_list_;
+ scoped_ptr<gfx::FontList> medium_font_list_;
+ scoped_ptr<gfx::FontList> medium_bold_font_list_;
+ scoped_ptr<gfx::FontList> large_font_list_;
+ scoped_ptr<gfx::FontList> large_bold_font_list_;
+ scoped_ptr<gfx::FontList> web_font_list_;
base::FilePath overridden_pak_path_;
« no previous file with comments | « chrome/browser/ui/views/omnibox/touch_omnibox_popup_contents_view.cc ('k') | ui/base/resource/resource_bundle.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698