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

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

Issue 816403003: Make callers of CommandLine use it via the base:: namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix Created 5 years, 12 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
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 858 matching lines...) Expand 10 before | Expand all | Expand 10 after
869 AddItemWithStringId(IDC_WIN_CHROMEOS_RESTART, IDS_WIN_CHROMEOS_RESTART); 869 AddItemWithStringId(IDC_WIN_CHROMEOS_RESTART, IDS_WIN_CHROMEOS_RESTART);
870 } 870 }
871 } 871 }
872 } 872 }
873 #endif 873 #endif
874 874
875 // Append the full menu including separators. The final separator only gets 875 // Append the full menu including separators. The final separator only gets
876 // appended when this is a touch menu - otherwise it would get added twice. 876 // appended when this is a touch menu - otherwise it would get added twice.
877 CreateCutCopyPasteMenu(); 877 CreateCutCopyPasteMenu();
878 878
879 if (CommandLine::ForCurrentProcess()->HasSwitch( 879 if (base::CommandLine::ForCurrentProcess()->HasSwitch(
880 switches::kEnableDomDistiller)) { 880 switches::kEnableDomDistiller)) {
881 AddItemWithStringId(IDC_DISTILL_PAGE, IDS_DISTILL_PAGE); 881 AddItemWithStringId(IDC_DISTILL_PAGE, IDS_DISTILL_PAGE);
882 } 882 }
883 883
884 AddItemWithStringId(IDC_SAVE_PAGE, IDS_SAVE_PAGE); 884 AddItemWithStringId(IDC_SAVE_PAGE, IDS_SAVE_PAGE);
885 AddItemWithStringId(IDC_FIND, IDS_FIND); 885 AddItemWithStringId(IDC_FIND, IDS_FIND);
886 AddItemWithStringId(IDC_PRINT, IDS_PRINT); 886 AddItemWithStringId(IDC_PRINT, IDS_PRINT);
887 887
888 tools_menu_model_.reset(new ToolsMenuModel(this, browser_)); 888 tools_menu_model_.reset(new ToolsMenuModel(this, browser_));
889 CreateZoomMenu(); 889 CreateZoomMenu();
(...skipping 24 matching lines...) Expand all
914 AddItem(IDC_ABOUT, l10n_util::GetStringUTF16(IDS_ABOUT)); 914 AddItem(IDC_ABOUT, l10n_util::GetStringUTF16(IDS_ABOUT));
915 #endif 915 #endif
916 916
917 #if defined(GOOGLE_CHROME_BUILD) 917 #if defined(GOOGLE_CHROME_BUILD)
918 help_menu_model_.reset(new HelpMenuModel(this, browser_)); 918 help_menu_model_.reset(new HelpMenuModel(this, browser_));
919 AddSubMenuWithStringId(IDC_HELP_MENU, IDS_HELP_MENU, 919 AddSubMenuWithStringId(IDC_HELP_MENU, IDS_HELP_MENU,
920 help_menu_model_.get()); 920 help_menu_model_.get());
921 #endif 921 #endif
922 922
923 #if defined(OS_CHROMEOS) 923 #if defined(OS_CHROMEOS)
924 if (CommandLine::ForCurrentProcess()->HasSwitch( 924 if (base::CommandLine::ForCurrentProcess()->HasSwitch(
925 chromeos::switches::kEnableRequestTabletSite)) 925 chromeos::switches::kEnableRequestTabletSite))
926 AddCheckItemWithStringId(IDC_TOGGLE_REQUEST_TABLET_SITE, 926 AddCheckItemWithStringId(IDC_TOGGLE_REQUEST_TABLET_SITE,
927 IDS_TOGGLE_REQUEST_TABLET_SITE); 927 IDS_TOGGLE_REQUEST_TABLET_SITE);
928 #endif 928 #endif
929 929
930 if (browser_defaults::kShowUpgradeMenuItem) 930 if (browser_defaults::kShowUpgradeMenuItem)
931 AddItem(IDC_UPGRADE_DIALOG, GetUpgradeDialogMenuItemName()); 931 AddItem(IDC_UPGRADE_DIALOG, GetUpgradeDialogMenuItemName());
932 932
933 #if defined(OS_WIN) 933 #if defined(OS_WIN)
934 SetIcon(GetIndexOfCommandId(IDC_VIEW_INCOMPATIBILITIES), 934 SetIcon(GetIndexOfCommandId(IDC_VIEW_INCOMPATIBILITIES),
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
1071 ->GetZoomPercent(); 1071 ->GetZoomPercent();
1072 } 1072 }
1073 zoom_label_ = l10n_util::GetStringFUTF16( 1073 zoom_label_ = l10n_util::GetStringFUTF16(
1074 IDS_ZOOM_PERCENT, base::IntToString16(zoom_percent)); 1074 IDS_ZOOM_PERCENT, base::IntToString16(zoom_percent));
1075 } 1075 }
1076 1076
1077 void WrenchMenuModel::OnZoomLevelChanged( 1077 void WrenchMenuModel::OnZoomLevelChanged(
1078 const content::HostZoomMap::ZoomLevelChange& change) { 1078 const content::HostZoomMap::ZoomLevelChange& change) {
1079 UpdateZoomControls(); 1079 UpdateZoomControls();
1080 } 1080 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/toolbar/toolbar_model_unittest.cc ('k') | chrome/browser/ui/views/app_list/win/app_list_service_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698