diff options
author | yukishiino@chromium.org <yukishiino@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-01-14 13:48:48 +0000 |
---|---|---|
committer | yukishiino@chromium.org <yukishiino@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-01-14 13:48:48 +0000 |
commit | 1b9d460c4de34e226f7d67cc305014099fcd2693 (patch) | |
tree | c8b0d2ceb23c62a062496a4ad941344f0a776f23 /ash | |
parent | 736315d37daa263e6ce11f0b2e6fcd646a96e2f2 (diff) | |
download | chromium_src-1b9d460c4de34e226f7d67cc305014099fcd2693.zip chromium_src-1b9d460c4de34e226f7d67cc305014099fcd2693.tar.gz chromium_src-1b9d460c4de34e226f7d67cc305014099fcd2693.tar.bz2 |
Refactor: Makes menus use gfx::FontList instead of gfx::Font.
As part of effort to support multiple fonts, this CL changes methods which are now taking gfx::Font so they will take gfx::FontList instead.
See https://docs.google.com/a/chromium.org/document/d/1D_25fp9B8b9aZJORfAjDIFq61NWvUquZ5xmKH-VcC4k/view
BUG=265485
TEST=Run unit_tests, ui_unittests, views_unittests
Review URL: https://codereview.chromium.org/117903006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@244684 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash')
-rw-r--r-- | ash/shelf/shelf_view.cc | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/ash/shelf/shelf_view.cc b/ash/shelf/shelf_view.cc index 4348c98..b387e25 100644 --- a/ash/shelf/shelf_view.cc +++ b/ash/shelf/shelf_view.cc @@ -128,7 +128,7 @@ class ShelfMenuModelAdapter : public views::MenuModelAdapter { explicit ShelfMenuModelAdapter(ShelfMenuModel* menu_model); // views::MenuModelAdapter: - virtual const gfx::Font* GetLabelFont(int command_id) const OVERRIDE; + virtual const gfx::FontList* GetLabelFontList(int command_id) const OVERRIDE; virtual bool IsCommandEnabled(int id) const OVERRIDE; virtual void GetHorizontalIconMargins(int id, int icon_size, @@ -154,12 +154,13 @@ ShelfMenuModelAdapter::ShelfMenuModelAdapter(ShelfMenuModel* menu_model) menu_model_(menu_model) { } -const gfx::Font* ShelfMenuModelAdapter::GetLabelFont(int command_id) const { +const gfx::FontList* ShelfMenuModelAdapter::GetLabelFontList( + int command_id) const { if (command_id != kCommandIdOfMenuName) - return MenuModelAdapter::GetLabelFont(command_id); + return MenuModelAdapter::GetLabelFontList(command_id); ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); - return &rb.GetFont(ui::ResourceBundle::BoldFont); + return &rb.GetFontList(ui::ResourceBundle::BoldFont); } bool ShelfMenuModelAdapter::IsCommandEnabled(int id) const { |