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

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

Issue 1003853004: MacViews: Gets wrench menu working (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@grd
Patch Set: Created 5 years, 9 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 | « chrome/app/chrome_command_ids.h ('k') | chrome/browser/ui/views/toolbar/wrench_menu.h » ('j') | 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 ad3717f77a527f3784655e79eb19dc5dbfda5d5b..c7a0991892fdfbb61b75cdc9d89b944b5b816d20 100644
--- a/chrome/browser/ui/toolbar/wrench_menu_model.cc
+++ b/chrome/browser/ui/toolbar/wrench_menu_model.cc
@@ -955,7 +955,7 @@ void WrenchMenuModel::Build() {
AddSeparator(ui::NORMAL_SEPARATOR);
AddSubMenuWithStringId(
- IDC_ZOOM_MENU, IDS_MORE_TOOLS_MENU, tools_menu_model_.get());
+ IDC_MORE_TOOLS_MENU, IDS_MORE_TOOLS_MENU, tools_menu_model_.get());
bool show_exit_menu = browser_defaults::kShowExitMenuItem;
#if defined(OS_WIN)
@@ -1027,22 +1027,14 @@ void WrenchMenuModel::CreateExtensionToolbarOverflowMenu() {
void WrenchMenuModel::CreateCutCopyPasteMenu() {
AddSeparator(ui::LOWER_SEPARATOR);
-#if defined(OS_MACOSX)
// WARNING: Mac does not use the ButtonMenuItemModel, but instead defines the
- // layout for this menu item in Toolbar.xib. It does, however, use the
+ // layout for this menu item in WrenchMenu.xib. It does, however, use the
// command_id value from AddButtonItem() to identify this special item.
edit_menu_item_model_.reset(new ui::ButtonMenuItemModel(IDS_EDIT, this));
edit_menu_item_model_->AddGroupItemWithStringId(IDC_CUT, IDS_CUT);
edit_menu_item_model_->AddGroupItemWithStringId(IDC_COPY, IDS_COPY);
edit_menu_item_model_->AddGroupItemWithStringId(IDC_PASTE, IDS_PASTE);
AddButtonItem(IDC_EDIT_MENU, edit_menu_item_model_.get());
-#else
- // WARNING: views/wrench_menu assumes these items are added in this order. If
- // you change the order you'll need to update wrench_menu as well.
- AddItemWithStringId(IDC_CUT, IDS_CUT);
- AddItemWithStringId(IDC_COPY, IDS_COPY);
- AddItemWithStringId(IDC_PASTE, IDS_PASTE);
-#endif
AddSeparator(ui::UPPER_SEPARATOR);
}
@@ -1051,29 +1043,18 @@ void WrenchMenuModel::CreateZoomMenu() {
// This menu needs to be enclosed by separators.
AddSeparator(ui::LOWER_SEPARATOR);
-#if defined(OS_MACOSX)
// WARNING: Mac does not use the ButtonMenuItemModel, but instead defines the
- // layout for this menu item in Toolbar.xib. It does, however, use the
+ // layout for this menu item in WrenchMenu.xib. It does, however, use the
// command_id value from AddButtonItem() to identify this special item.
zoom_menu_item_model_.reset(
new ui::ButtonMenuItemModel(IDS_ZOOM_MENU, this));
- zoom_menu_item_model_->AddGroupItemWithStringId(
- IDC_ZOOM_MINUS, IDS_ZOOM_MINUS2);
- zoom_menu_item_model_->AddButtonLabel(IDC_ZOOM_PERCENT_DISPLAY,
- IDS_ZOOM_PLUS2);
- zoom_menu_item_model_->AddGroupItemWithStringId(
- IDC_ZOOM_PLUS, IDS_ZOOM_PLUS2);
- zoom_menu_item_model_->AddSpace();
- zoom_menu_item_model_->AddItemWithImage(
- IDC_FULLSCREEN, IDR_FULLSCREEN_MENU_BUTTON);
+ zoom_menu_item_model_->AddGroupItemWithStringId(IDC_ZOOM_MINUS,
+ IDS_ZOOM_MINUS2);
+ zoom_menu_item_model_->AddGroupItemWithStringId(IDC_ZOOM_PLUS,
+ IDS_ZOOM_PLUS2);
+ zoom_menu_item_model_->AddItemWithImage(IDC_FULLSCREEN,
+ IDR_FULLSCREEN_MENU_BUTTON);
AddButtonItem(IDC_ZOOM_MENU, zoom_menu_item_model_.get());
-#else
- // WARNING: views/wrench_menu assumes these items are added in this order. If
- // you change the order you'll need to update wrench_menu as well.
- AddItemWithStringId(IDC_ZOOM_MINUS, IDS_ZOOM_MINUS);
- AddItemWithStringId(IDC_ZOOM_PLUS, IDS_ZOOM_PLUS);
- AddItemWithStringId(IDC_FULLSCREEN, IDS_FULLSCREEN);
-#endif
AddSeparator(ui::UPPER_SEPARATOR);
}
« no previous file with comments | « chrome/app/chrome_command_ids.h ('k') | chrome/browser/ui/views/toolbar/wrench_menu.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698