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

Side by Side Diff: chrome/browser/ui/toolbar/wrench_menu_model.cc

Issue 700453003: Revert of Make extensions that desire to act pop out if in overflow (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/toolbar/wrench_menu_model.h" 5 #include "chrome/browser/ui/toolbar/wrench_menu_model.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cmath> 8 #include <cmath>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 698 matching lines...) Expand 10 before | Expand all | Expand 10 after
709 } 709 }
710 } 710 }
711 711
712 void WrenchMenuModel::CreateExtensionToolbarOverflowMenu() { 712 void WrenchMenuModel::CreateExtensionToolbarOverflowMenu() {
713 #if defined(TOOLKIT_VIEWS) 713 #if defined(TOOLKIT_VIEWS)
714 AddItem(IDC_EXTENSIONS_OVERFLOW_MENU, base::string16()); 714 AddItem(IDC_EXTENSIONS_OVERFLOW_MENU, base::string16());
715 // We only add the separator if there are > 0 items to show in the overflow. 715 // We only add the separator if there are > 0 items to show in the overflow.
716 extensions::ExtensionToolbarModel* toolbar_model = 716 extensions::ExtensionToolbarModel* toolbar_model =
717 extensions::ExtensionToolbarModel::Get(browser_->profile()); 717 extensions::ExtensionToolbarModel::Get(browser_->profile());
718 // A count of -1 means all actions are visible. 718 // A count of -1 means all actions are visible.
719 if (!toolbar_model->all_icons_visible()) 719 if (toolbar_model->GetVisibleIconCount() != -1)
720 AddSeparator(ui::UPPER_SEPARATOR); 720 AddSeparator(ui::UPPER_SEPARATOR);
721 #endif // defined(TOOLKIT_VIEWS) 721 #endif // defined(TOOLKIT_VIEWS)
722 } 722 }
723 723
724 void WrenchMenuModel::CreateCutCopyPasteMenu() { 724 void WrenchMenuModel::CreateCutCopyPasteMenu() {
725 AddSeparator(ui::LOWER_SEPARATOR); 725 AddSeparator(ui::LOWER_SEPARATOR);
726 726
727 #if defined(OS_POSIX) && !defined(TOOLKIT_VIEWS) 727 #if defined(OS_POSIX) && !defined(TOOLKIT_VIEWS)
728 // WARNING: Mac does not use the ButtonMenuItemModel, but instead defines the 728 // WARNING: Mac does not use the ButtonMenuItemModel, but instead defines the
729 // layout for this menu item in Toolbar.xib. It does, however, use the 729 // layout for this menu item in Toolbar.xib. It does, however, use the
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
783 ->GetZoomPercent(); 783 ->GetZoomPercent();
784 } 784 }
785 zoom_label_ = l10n_util::GetStringFUTF16( 785 zoom_label_ = l10n_util::GetStringFUTF16(
786 IDS_ZOOM_PERCENT, base::IntToString16(zoom_percent)); 786 IDS_ZOOM_PERCENT, base::IntToString16(zoom_percent));
787 } 787 }
788 788
789 void WrenchMenuModel::OnZoomLevelChanged( 789 void WrenchMenuModel::OnZoomLevelChanged(
790 const content::HostZoomMap::ZoomLevelChange& change) { 790 const content::HostZoomMap::ZoomLevelChange& change) {
791 UpdateZoomControls(); 791 UpdateZoomControls();
792 } 792 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698