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

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

Issue 820713008: [Extensions Toolbar Mac] Implement drag-and-drop for the overflow menu (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years 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 | « chrome/browser/ui/cocoa/extensions/browser_actions_controller.mm ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/toolbar/wrench_menu_model.cc
diff --git a/chrome/browser/ui/toolbar/wrench_menu_model.cc b/chrome/browser/ui/toolbar/wrench_menu_model.cc
index c92206a9a171199d720e218916555c8e09210fd9..c4d9efbba83811bd4c5416cec31dbd9c47bb9e03 100644
--- a/chrome/browser/ui/toolbar/wrench_menu_model.cc
+++ b/chrome/browser/ui/toolbar/wrench_menu_model.cc
@@ -1000,13 +1000,13 @@ void WrenchMenuModel::AddGlobalErrorMenuItems() {
}
void WrenchMenuModel::CreateExtensionToolbarOverflowMenu() {
- AddItem(IDC_EXTENSIONS_OVERFLOW_MENU, base::string16());
- // We only add the separator if there are > 0 items to show in the overflow.
- extensions::ExtensionToolbarModel* toolbar_model =
- extensions::ExtensionToolbarModel::Get(browser_->profile());
- // A count of -1 means all actions are visible.
- if (!toolbar_model->all_icons_visible())
+ // We only add the extensions overflow container if there are any icons that
+ // aren't shown in the main container.
+ if (!extensions::ExtensionToolbarModel::Get(browser_->profile())->
+ all_icons_visible()) {
+ AddItem(IDC_EXTENSIONS_OVERFLOW_MENU, base::string16());
AddSeparator(ui::UPPER_SEPARATOR);
+ }
}
void WrenchMenuModel::CreateCutCopyPasteMenu() {
« no previous file with comments | « chrome/browser/ui/cocoa/extensions/browser_actions_controller.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698