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

Unified Diff: chrome/browser/ui/views/toolbar/wrench_menu.cc

Issue 637243004: remove 320 max-width restriction for Recent Tabs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/toolbar/wrench_menu.cc
diff --git a/chrome/browser/ui/views/toolbar/wrench_menu.cc b/chrome/browser/ui/views/toolbar/wrench_menu.cc
index f441bd1b113305aae7d01ea192ca2e41018854d9..d0c2cfd951a6af70aa5afca4f58187470975bdf7 100644
--- a/chrome/browser/ui/views/toolbar/wrench_menu.cc
+++ b/chrome/browser/ui/views/toolbar/wrench_menu.cc
@@ -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 {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698