Commit 9a27e48b authored by kuan's avatar kuan Committed by Commit bot

remove 320 max-width restriction for Recent Tabs

BUG=339101

Review URL: https://codereview.chromium.org/637243004

Cr-Commit-Position: refs/heads/master@{#300433}
parent 07551630
......@@ -727,16 +727,6 @@ class WrenchMenu::RecentTabsMenuModelDelegate : public ui::MenuModelDelegate {
model_->SetMenuModelDelegate(NULL);
}
// Return the specific menu width of recent tabs submenu if |menu| is the
// recent tabs submenu, else return -1.
int GetMaxWidthForMenu(views::MenuItemView* menu) {
if (!menu_item_->HasSubmenu())
return -1;
const int kMaxMenuItemWidth = 320;
return menu->GetCommand() == menu_item_->GetCommand() ?
kMaxMenuItemWidth : -1;
}
const gfx::FontList* GetLabelFontListAt(int index) const {
return model_->GetLabelFontListAt(index);
}
......@@ -984,15 +974,7 @@ int WrenchMenu::GetDragOperations(MenuItemView* sender) {
int WrenchMenu::GetMaxWidthForMenu(MenuItemView* menu) {
if (IsBookmarkCommand(menu->GetCommand()))
return bookmark_menu_delegate_->GetMaxWidthForMenu(menu);
int max_width = -1;
// If recent tabs menu is available, it will decide if |menu| is one of recent
// tabs; if yes, it would return the menu width for recent tabs.
// otherwise, it would return -1.
if (recent_tabs_menu_model_delegate_.get())
max_width = recent_tabs_menu_model_delegate_->GetMaxWidthForMenu(menu);
if (max_width == -1)
max_width = MenuDelegate::GetMaxWidthForMenu(menu);
return max_width;
return MenuDelegate::GetMaxWidthForMenu(menu);
}
bool WrenchMenu::IsItemChecked(int command_id) const {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment