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

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

Issue 1182493009: Wrench menu reorg phase 2 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix incorrect title case expr causing wrong strings to be displayed on OSX Created 5 years, 6 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
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 ca65ad365d4859b9fa42c920590df7dd574c96d3..6a25b5b633d9e2cdd60b99e577b6a0e93555cf9f 100644
--- a/chrome/browser/ui/toolbar/wrench_menu_model.cc
+++ b/chrome/browser/ui/toolbar/wrench_menu_model.cc
@@ -248,6 +248,10 @@ class WrenchMenuModel::HelpMenuModel : public ui::SimpleMenuModel {
#else
int help_string_id = IDS_HELP_PAGE;
#endif
+// Don't display the about menu item on Chrome OS.
Peter Kasting 2015/06/17 22:59:43 Nit: Say why not.
edwardjung 2015/06/18 16:52:05 Done. Although there doesn't seem to a logical rea
+#if !defined(OS_CHROMEOS)
+ AddItem(IDC_ABOUT, l10n_util::GetStringUTF16(IDS_ABOUT));
+#endif
AddItemWithStringId(IDC_HELP_PAGE_VIA_MENU, help_string_id);
if (browser_defaults::kShowHelpMenuItemIcon) {
ui::ResourceBundle& rb = ResourceBundle::GetSharedInstance();
@@ -283,11 +287,7 @@ void ToolsMenuModel::Build(Browser* browser) {
show_create_shortcuts = false;
#endif
- AddItemWithStringId(IDC_CLEAR_BROWSING_DATA, IDS_CLEAR_BROWSING_DATA);
- AddItemWithStringId(IDC_MANAGE_EXTENSIONS, IDS_SHOW_EXTENSIONS);
-
- if (chrome::CanOpenTaskManager())
- AddItemWithStringId(IDC_TASK_MANAGER, IDS_TASK_MANAGER);
+ AddItemWithStringId(IDC_SAVE_PAGE, IDS_SAVE_PAGE);
if (extensions::util::IsNewBookmarkAppsEnabled()) {
#if defined(OS_MACOSX)
@@ -305,6 +305,12 @@ void ToolsMenuModel::Build(Browser* browser) {
} else if (show_create_shortcuts) {
AddItemWithStringId(IDC_CREATE_SHORTCUTS, IDS_CREATE_SHORTCUTS);
}
+ AddSeparator(ui::NORMAL_SEPARATOR);
+ AddItemWithStringId(IDC_CLEAR_BROWSING_DATA, IDS_CLEAR_BROWSING_DATA);
+ AddItemWithStringId(IDC_MANAGE_EXTENSIONS, IDS_SHOW_EXTENSIONS);
+
+ if (chrome::CanOpenTaskManager())
+ AddItemWithStringId(IDC_TASK_MANAGER, IDS_TASK_MANAGER);
#if defined(OS_CHROMEOS)
AddItemWithStringId(IDC_TAKE_SCREENSHOT, IDS_TAKE_SCREENSHOT);
@@ -314,10 +320,8 @@ void ToolsMenuModel::Build(Browser* browser) {
AddSubMenuWithStringId(IDC_ENCODING_MENU, IDS_ENCODING_MENU,
encoding_menu_model_.get());
AddSeparator(ui::NORMAL_SEPARATOR);
+
Peter Kasting 2015/06/17 22:59:43 Nit: I can't figure out the logic of when this fun
edwardjung 2015/06/18 16:52:05 Reformatted. Blank lines added for each section of
AddItemWithStringId(IDC_DEV_TOOLS, IDS_DEV_TOOLS);
- AddItemWithStringId(IDC_VIEW_SOURCE, IDS_VIEW_SOURCE);
Peter Kasting 2015/06/17 22:59:43 Why are we removing View Source? I don't think th
edwardjung 2015/06/18 16:52:05 There's a lot more detail reorganisation in the bu
Peter Kasting 2015/06/18 17:16:58 I'm still concerned about this. * 3.5% of total V
edwardjung 2015/06/18 17:42:27 Copying comments here so that ainslie can see the
- AddItemWithStringId(IDC_DEV_TOOLS_CONSOLE, IDS_DEV_TOOLS_CONSOLE);
- AddItemWithStringId(IDC_DEV_TOOLS_DEVICES, IDS_DEV_TOOLS_DEVICES);
#if defined(ENABLE_PROFILING) && !defined(NO_TCMALLOC)
AddSeparator(ui::NORMAL_SEPARATOR);
@@ -904,16 +908,14 @@ void WrenchMenuModel::Build() {
AddSeparator(ui::NORMAL_SEPARATOR);
- AddItemWithStringId(IDC_SHOW_HISTORY, IDS_SHOW_HISTORY);
- AddItemWithStringId(IDC_SHOW_DOWNLOADS, IDS_SHOW_DOWNLOADS);
-
if (!browser_->profile()->IsOffTheRecord()) {
recent_tabs_sub_menu_model_.reset(new RecentTabsSubMenuModel(provider_,
browser_,
NULL));
- AddSubMenuWithStringId(IDC_RECENT_TABS_MENU, IDS_RECENT_TABS_MENU,
+ AddSubMenuWithStringId(IDC_RECENT_TABS_MENU, IDS_HISTORY_RECENT_TABS_MENU,
recent_tabs_sub_menu_model_.get());
}
+ AddItemWithStringId(IDC_SHOW_DOWNLOADS, IDS_SHOW_DOWNLOADS);
if (!browser_->profile()->IsGuestSession()) {
bookmark_sub_menu_model_.reset(new BookmarkSubMenuModel(this, browser_));
@@ -924,7 +926,7 @@ void WrenchMenuModel::Build() {
CreateZoomMenu();
AddItemWithStringId(IDC_PRINT, IDS_PRINT);
- AddItemWithStringId(IDC_SAVE_PAGE, IDS_SAVE_PAGE);
+ // AddItemWithStringId(IDC_SAVE_PAGE, IDS_SAVE_PAGE);
Peter Kasting 2015/06/17 22:59:43 In or out, but not in-but-commented-out.
edwardjung 2015/06/18 16:52:05 Done.
AddItemWithStringId(IDC_FIND, IDS_FIND);
if (base::CommandLine::ForCurrentProcess()->HasSwitch(
switches::kEnableDomDistiller))
@@ -955,15 +957,13 @@ void WrenchMenuModel::Build() {
}
#endif
-// On ChromeOS we don't want the about menu option.
-#if !defined(OS_CHROMEOS)
- AddItem(IDC_ABOUT, l10n_util::GetStringUTF16(IDS_ABOUT));
-#endif
-
#if defined(GOOGLE_CHROME_BUILD)
help_menu_model_.reset(new HelpMenuModel(this, browser_));
AddSubMenuWithStringId(IDC_HELP_MENU, IDS_HELP_MENU,
help_menu_model_.get());
+#elif !defined(OS_CHROMEOS)
+ // Display the about menu item for non Chrome OS and non Google builds.
Peter Kasting 2015/06/17 22:59:43 Why do we have two blocks in this file both dedica
edwardjung 2015/06/18 16:52:05 We moved the 'About' menu item under the help subm
+ AddItem(IDC_ABOUT, l10n_util::GetStringUTF16(IDS_ABOUT));
#endif
#if defined(OS_CHROMEOS)

Powered by Google App Engine
This is Rietveld 408576698