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

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

Issue 1508853008: chrome: rename more wrench/Wrench occurrencies to appMenu/AppMenu (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix updateAppButtonSeverity and rewrap + rebase Created 5 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 unified diff | Download patch
« no previous file with comments | « chrome/browser/ui/cocoa/toolbar/toolbar_controller_unittest.mm ('k') | chrome/chrome_nibs.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/app_menu_model.h" 5 #include "chrome/browser/ui/toolbar/app_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 964 matching lines...) Expand 10 before | Expand all | Expand 10 after
975 #endif 975 #endif
976 AddItem(IDC_EXTENSIONS_OVERFLOW_MENU, base::string16()); 976 AddItem(IDC_EXTENSIONS_OVERFLOW_MENU, base::string16());
977 AddSeparator(ui::UPPER_SEPARATOR); 977 AddSeparator(ui::UPPER_SEPARATOR);
978 } 978 }
979 } 979 }
980 980
981 void AppMenuModel::CreateCutCopyPasteMenu() { 981 void AppMenuModel::CreateCutCopyPasteMenu() {
982 AddSeparator(ui::LOWER_SEPARATOR); 982 AddSeparator(ui::LOWER_SEPARATOR);
983 983
984 // WARNING: Mac does not use the ButtonMenuItemModel, but instead defines the 984 // WARNING: Mac does not use the ButtonMenuItemModel, but instead defines the
985 // layout for this menu item in WrenchMenu.xib. It does, however, use the 985 // layout for this menu item in AppMenu.xib. It does, however, use the
986 // command_id value from AddButtonItem() to identify this special item. 986 // command_id value from AddButtonItem() to identify this special item.
987 edit_menu_item_model_.reset(new ui::ButtonMenuItemModel(IDS_EDIT, this)); 987 edit_menu_item_model_.reset(new ui::ButtonMenuItemModel(IDS_EDIT, this));
988 edit_menu_item_model_->AddGroupItemWithStringId(IDC_CUT, IDS_CUT); 988 edit_menu_item_model_->AddGroupItemWithStringId(IDC_CUT, IDS_CUT);
989 edit_menu_item_model_->AddGroupItemWithStringId(IDC_COPY, IDS_COPY); 989 edit_menu_item_model_->AddGroupItemWithStringId(IDC_COPY, IDS_COPY);
990 edit_menu_item_model_->AddGroupItemWithStringId(IDC_PASTE, IDS_PASTE); 990 edit_menu_item_model_->AddGroupItemWithStringId(IDC_PASTE, IDS_PASTE);
991 AddButtonItem(IDC_EDIT_MENU, edit_menu_item_model_.get()); 991 AddButtonItem(IDC_EDIT_MENU, edit_menu_item_model_.get());
992 992
993 AddSeparator(ui::UPPER_SEPARATOR); 993 AddSeparator(ui::UPPER_SEPARATOR);
994 } 994 }
995 995
996 void AppMenuModel::CreateZoomMenu() { 996 void AppMenuModel::CreateZoomMenu() {
997 // This menu needs to be enclosed by separators. 997 // This menu needs to be enclosed by separators.
998 AddSeparator(ui::LOWER_SEPARATOR); 998 AddSeparator(ui::LOWER_SEPARATOR);
999 999
1000 // WARNING: Mac does not use the ButtonMenuItemModel, but instead defines the 1000 // WARNING: Mac does not use the ButtonMenuItemModel, but instead defines the
1001 // layout for this menu item in WrenchMenu.xib. It does, however, use the 1001 // layout for this menu item in AppMenu.xib. It does, however, use the
1002 // command_id value from AddButtonItem() to identify this special item. 1002 // command_id value from AddButtonItem() to identify this special item.
1003 zoom_menu_item_model_.reset( 1003 zoom_menu_item_model_.reset(
1004 new ui::ButtonMenuItemModel(IDS_ZOOM_MENU, this)); 1004 new ui::ButtonMenuItemModel(IDS_ZOOM_MENU, this));
1005 zoom_menu_item_model_->AddGroupItemWithStringId(IDC_ZOOM_MINUS, 1005 zoom_menu_item_model_->AddGroupItemWithStringId(IDC_ZOOM_MINUS,
1006 IDS_ZOOM_MINUS2); 1006 IDS_ZOOM_MINUS2);
1007 zoom_menu_item_model_->AddGroupItemWithStringId(IDC_ZOOM_PLUS, 1007 zoom_menu_item_model_->AddGroupItemWithStringId(IDC_ZOOM_PLUS,
1008 IDS_ZOOM_PLUS2); 1008 IDS_ZOOM_PLUS2);
1009 zoom_menu_item_model_->AddItemWithImage(IDC_FULLSCREEN, 1009 zoom_menu_item_model_->AddItemWithImage(IDC_FULLSCREEN,
1010 IDR_FULLSCREEN_MENU_BUTTON); 1010 IDR_FULLSCREEN_MENU_BUTTON);
1011 AddButtonItem(IDC_ZOOM_MENU, zoom_menu_item_model_.get()); 1011 AddButtonItem(IDC_ZOOM_MENU, zoom_menu_item_model_.get());
(...skipping 10 matching lines...) Expand all
1022 ->GetZoomPercent(); 1022 ->GetZoomPercent();
1023 } 1023 }
1024 zoom_label_ = l10n_util::GetStringFUTF16( 1024 zoom_label_ = l10n_util::GetStringFUTF16(
1025 IDS_ZOOM_PERCENT, base::IntToString16(zoom_percent)); 1025 IDS_ZOOM_PERCENT, base::IntToString16(zoom_percent));
1026 } 1026 }
1027 1027
1028 void AppMenuModel::OnZoomLevelChanged( 1028 void AppMenuModel::OnZoomLevelChanged(
1029 const content::HostZoomMap::ZoomLevelChange& change) { 1029 const content::HostZoomMap::ZoomLevelChange& change) {
1030 UpdateZoomControls(); 1030 UpdateZoomControls();
1031 } 1031 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/toolbar/toolbar_controller_unittest.mm ('k') | chrome/chrome_nibs.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698