Skip to content
This repository was archived by the owner on Apr 3, 2020. It is now read-only.

Commit 9a27e48

Browse files
kuan8Commit bot
authored and
Commit bot
committed
remove 320 max-width restriction for Recent Tabs
BUG=339101 Review URL: https://codereview.chromium.org/637243004 Cr-Commit-Position: refs/heads/master@{#300433}
1 parent 0755163 commit 9a27e48

File tree

1 file changed

+1
-19
lines changed

1 file changed

+1
-19
lines changed

chrome/browser/ui/views/toolbar/wrench_menu.cc

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -727,16 +727,6 @@ class WrenchMenu::RecentTabsMenuModelDelegate : public ui::MenuModelDelegate {
727727
model_->SetMenuModelDelegate(NULL);
728728
}
729729

730-
// Return the specific menu width of recent tabs submenu if |menu| is the
731-
// recent tabs submenu, else return -1.
732-
int GetMaxWidthForMenu(views::MenuItemView* menu) {
733-
if (!menu_item_->HasSubmenu())
734-
return -1;
735-
const int kMaxMenuItemWidth = 320;
736-
return menu->GetCommand() == menu_item_->GetCommand() ?
737-
kMaxMenuItemWidth : -1;
738-
}
739-
740730
const gfx::FontList* GetLabelFontListAt(int index) const {
741731
return model_->GetLabelFontListAt(index);
742732
}
@@ -984,15 +974,7 @@ int WrenchMenu::GetDragOperations(MenuItemView* sender) {
984974
int WrenchMenu::GetMaxWidthForMenu(MenuItemView* menu) {
985975
if (IsBookmarkCommand(menu->GetCommand()))
986976
return bookmark_menu_delegate_->GetMaxWidthForMenu(menu);
987-
int max_width = -1;
988-
// If recent tabs menu is available, it will decide if |menu| is one of recent
989-
// tabs; if yes, it would return the menu width for recent tabs.
990-
// otherwise, it would return -1.
991-
if (recent_tabs_menu_model_delegate_.get())
992-
max_width = recent_tabs_menu_model_delegate_->GetMaxWidthForMenu(menu);
993-
if (max_width == -1)
994-
max_width = MenuDelegate::GetMaxWidthForMenu(menu);
995-
return max_width;
977+
return MenuDelegate::GetMaxWidthForMenu(menu);
996978
}
997979

998980
bool WrenchMenu::IsItemChecked(int command_id) const {

0 commit comments

Comments
 (0)