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

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

Issue 511923002: Move 'Extensions' to the main menu for settings-in-a-window (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | 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/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 232 matching lines...) Expand 10 before | Expand all | Expand 10 after
243 243
244 if (CommandLine::ForCurrentProcess()->HasSwitch( 244 if (CommandLine::ForCurrentProcess()->HasSwitch(
245 switches::kEnableStreamlinedHostedApps)) { 245 switches::kEnableStreamlinedHostedApps)) {
246 AddItemWithStringId(IDC_CREATE_HOSTED_APP, IDS_CREATE_HOSTED_APP); 246 AddItemWithStringId(IDC_CREATE_HOSTED_APP, IDS_CREATE_HOSTED_APP);
247 AddSeparator(ui::NORMAL_SEPARATOR); 247 AddSeparator(ui::NORMAL_SEPARATOR);
248 } else if (show_create_shortcuts) { 248 } else if (show_create_shortcuts) {
249 AddItemWithStringId(IDC_CREATE_SHORTCUTS, IDS_CREATE_SHORTCUTS); 249 AddItemWithStringId(IDC_CREATE_SHORTCUTS, IDS_CREATE_SHORTCUTS);
250 AddSeparator(ui::NORMAL_SEPARATOR); 250 AddSeparator(ui::NORMAL_SEPARATOR);
251 } 251 }
252 252
253 AddItemWithStringId(IDC_MANAGE_EXTENSIONS, IDS_SHOW_EXTENSIONS); 253 // If settins-in-a-window is enabled, the Extensions item is at the top level.
Evan Stade 2014/08/28 18:13:51 nit: spelling
stevenjb 2014/08/28 19:50:00 Done.
254 if (!::switches::SettingsWindowEnabled())
255 AddItemWithStringId(IDC_MANAGE_EXTENSIONS, IDS_SHOW_EXTENSIONS);
254 256
255 if (chrome::CanOpenTaskManager()) 257 if (chrome::CanOpenTaskManager())
256 AddItemWithStringId(IDC_TASK_MANAGER, IDS_TASK_MANAGER); 258 AddItemWithStringId(IDC_TASK_MANAGER, IDS_TASK_MANAGER);
257 259
258 AddItemWithStringId(IDC_CLEAR_BROWSING_DATA, IDS_CLEAR_BROWSING_DATA); 260 AddItemWithStringId(IDC_CLEAR_BROWSING_DATA, IDS_CLEAR_BROWSING_DATA);
259 261
260 AddSeparator(ui::NORMAL_SEPARATOR); 262 AddSeparator(ui::NORMAL_SEPARATOR);
261 263
262 encoding_menu_model_.reset(new EncodingMenuModel(browser)); 264 encoding_menu_model_.reset(new EncodingMenuModel(browser));
263 AddSubMenuWithStringId(IDC_ENCODING_MENU, IDS_ENCODING_MENU, 265 AddSubMenuWithStringId(IDC_ENCODING_MENU, IDS_ENCODING_MENU,
(...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after
606 608
607 AddItemWithStringId(IDC_SAVE_PAGE, IDS_SAVE_PAGE); 609 AddItemWithStringId(IDC_SAVE_PAGE, IDS_SAVE_PAGE);
608 AddItemWithStringId(IDC_FIND, IDS_FIND); 610 AddItemWithStringId(IDC_FIND, IDS_FIND);
609 AddItemWithStringId(IDC_PRINT, IDS_PRINT); 611 AddItemWithStringId(IDC_PRINT, IDS_PRINT);
610 612
611 tools_menu_model_.reset(new ToolsMenuModel(this, browser_)); 613 tools_menu_model_.reset(new ToolsMenuModel(this, browser_));
612 CreateZoomMenu(); 614 CreateZoomMenu();
613 615
614 AddItemWithStringId(IDC_SHOW_HISTORY, IDS_SHOW_HISTORY); 616 AddItemWithStringId(IDC_SHOW_HISTORY, IDS_SHOW_HISTORY);
615 AddItemWithStringId(IDC_SHOW_DOWNLOADS, IDS_SHOW_DOWNLOADS); 617 AddItemWithStringId(IDC_SHOW_DOWNLOADS, IDS_SHOW_DOWNLOADS);
618 // If settins-in-a-window is enabled, the Extensions item is at the top level.
Evan Stade 2014/08/28 18:13:51 spelling again
stevenjb 2014/08/28 19:50:00 Done.
619 if (::switches::SettingsWindowEnabled())
620 AddItemWithStringId(IDC_MANAGE_EXTENSIONS, IDS_SHOW_EXTENSIONS);
616 AddSeparator(ui::NORMAL_SEPARATOR); 621 AddSeparator(ui::NORMAL_SEPARATOR);
617 622
618 #if !defined(OS_CHROMEOS) 623 #if !defined(OS_CHROMEOS)
619 if (!switches::IsNewAvatarMenu()) { 624 if (!switches::IsNewAvatarMenu()) {
620 // No "Sign in to Chromium..." menu item on ChromeOS. 625 // No "Sign in to Chromium..." menu item on ChromeOS.
621 SigninManager* signin = SigninManagerFactory::GetForProfile( 626 SigninManager* signin = SigninManagerFactory::GetForProfile(
622 browser_->profile()->GetOriginalProfile()); 627 browser_->profile()->GetOriginalProfile());
623 if (signin && signin->IsSigninAllowed()) { 628 if (signin && signin->IsSigninAllowed()) {
624 const base::string16 short_product_name = 629 const base::string16 short_product_name =
625 l10n_util::GetStringUTF16(IDS_SHORT_PRODUCT_NAME); 630 l10n_util::GetStringUTF16(IDS_SHORT_PRODUCT_NAME);
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
795 ->GetZoomPercent(); 800 ->GetZoomPercent();
796 } 801 }
797 zoom_label_ = l10n_util::GetStringFUTF16( 802 zoom_label_ = l10n_util::GetStringFUTF16(
798 IDS_ZOOM_PERCENT, base::IntToString16(zoom_percent)); 803 IDS_ZOOM_PERCENT, base::IntToString16(zoom_percent));
799 } 804 }
800 805
801 void WrenchMenuModel::OnZoomLevelChanged( 806 void WrenchMenuModel::OnZoomLevelChanged(
802 const content::HostZoomMap::ZoomLevelChange& change) { 807 const content::HostZoomMap::ZoomLevelChange& change) {
803 UpdateZoomControls(); 808 UpdateZoomControls();
804 } 809 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698