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

Unified Diff: chrome/browser/ui/toolbar/recent_tabs_sub_menu_model.cc

Issue 117903006: Refactor: Makes menus use gfx::FontList instead of gfx::Font. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 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: chrome/browser/ui/toolbar/recent_tabs_sub_menu_model.cc
diff --git a/chrome/browser/ui/toolbar/recent_tabs_sub_menu_model.cc b/chrome/browser/ui/toolbar/recent_tabs_sub_menu_model.cc
index 4cba2adf5797669b54477b3b87fbd1f03d00ce30..6214f6000c63da5aed769dae0247a526e9e22f28 100644
--- a/chrome/browser/ui/toolbar/recent_tabs_sub_menu_model.cc
+++ b/chrome/browser/ui/toolbar/recent_tabs_sub_menu_model.cc
@@ -172,8 +172,8 @@ RecentTabsSubMenuModel::RecentTabsSubMenuModel(
browser_(browser),
open_tabs_delegate_(open_tabs_delegate),
last_local_model_index_(-1),
- default_favicon_(ResourceBundle::GetSharedInstance().
- GetNativeImageNamed(IDR_DEFAULT_FAVICON)),
+ default_favicon_(ui::ResourceBundle::GetSharedInstance().
+ GetNativeImageNamed(IDR_DEFAULT_FAVICON)),
weak_ptr_factory_(this) {
// Invoke asynchronous call to load tabs from local last session, which does
// nothing if the tabs have already been loaded or they shouldn't be loaded.
@@ -313,12 +313,13 @@ void RecentTabsSubMenuModel::ExecuteCommand(int command_id, int event_flags) {
}
}
-const gfx::Font* RecentTabsSubMenuModel::GetLabelFontAt(int index) const {
+const gfx::FontList* RecentTabsSubMenuModel::GetLabelFontListAt(
+ int index) const {
int command_id = GetCommandIdAt(index);
if (command_id == kRecentlyClosedHeaderCommandId ||
IsDeviceNameCommandId(command_id)) {
- return &ResourceBundle::GetSharedInstance().GetFont(
- ResourceBundle::BoldFont);
+ return &ui::ResourceBundle::GetSharedInstance().GetFontList(
+ ui::ResourceBundle::BoldFont);
}
return NULL;
}
@@ -385,7 +386,7 @@ void RecentTabsSubMenuModel::BuildLocalEntries() {
InsertItemWithStringIdAt(++last_local_model_index_,
kRecentlyClosedHeaderCommandId,
IDS_NEW_TAB_RECENTLY_CLOSED);
- ResourceBundle& rb = ResourceBundle::GetSharedInstance();
+ ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
SetIcon(last_local_model_index_,
rb.GetNativeImageNamed(IDR_RECENTLY_CLOSED_WINDOW));
@@ -527,7 +528,7 @@ void RecentTabsSubMenuModel::BuildLocalWindowItem(
IDS_NEW_TAB_RECENTLY_CLOSED_WINDOW_MULTIPLE,
base::IntToString16(num_tabs)));
}
- ResourceBundle& rb = ResourceBundle::GetSharedInstance();
+ ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
SetIcon(curr_model_index, rb.GetNativeImageNamed(IDR_RECENTLY_CLOSED_WINDOW));
local_window_items_.push_back(window_id);
}
@@ -575,7 +576,7 @@ void RecentTabsSubMenuModel::AddDeviceFavicon(
break;
};
- ResourceBundle& rb = ResourceBundle::GetSharedInstance();
+ ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
SetIcon(index_in_menu, rb.GetNativeImageNamed(favicon_id));
}

Powered by Google App Engine
This is Rietveld 408576698