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

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

Issue 320053002: Add shortcut for Help menu and Get Help (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/app/generated_resources.grd ('k') | 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 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 Browser* browser) 189 Browser* browser)
190 : SimpleMenuModel(delegate) { 190 : SimpleMenuModel(delegate) {
191 Build(browser); 191 Build(browser);
192 } 192 }
193 virtual ~HelpMenuModel() { 193 virtual ~HelpMenuModel() {
194 } 194 }
195 195
196 private: 196 private:
197 void Build(Browser* browser) { 197 void Build(Browser* browser) {
198 int help_string_id = IDS_HELP_PAGE; 198 int help_string_id = IDS_HELP_PAGE;
199 #if defined(OS_CHROMEOS) 199 #if defined(OS_CHROMEOS) && defined(OFFICIAL_BUILD)
200 if (!CommandLine::ForCurrentProcess()->HasSwitch( 200 if (!CommandLine::ForCurrentProcess()->HasSwitch(
201 chromeos::switches::kDisableGeniusApp)) { 201 chromeos::switches::kDisableGeniusApp)) {
202 help_string_id = IDS_GENIUS_APP_NAME; 202 help_string_id = IDS_GET_HELP;
203 } 203 }
204 #endif 204 #endif
205 AddItemWithStringId(IDC_HELP_PAGE_VIA_MENU, help_string_id); 205 AddItemWithStringId(IDC_HELP_PAGE_VIA_MENU, help_string_id);
206 if (browser_defaults::kShowHelpMenuItemIcon) { 206 if (browser_defaults::kShowHelpMenuItemIcon) {
207 ui::ResourceBundle& rb = ResourceBundle::GetSharedInstance(); 207 ui::ResourceBundle& rb = ResourceBundle::GetSharedInstance();
208 SetIcon(GetIndexOfCommandId(IDC_HELP_PAGE_VIA_MENU), 208 SetIcon(GetIndexOfCommandId(IDC_HELP_PAGE_VIA_MENU),
209 rb.GetNativeImageNamed(IDR_HELP_MENU)); 209 rb.GetNativeImageNamed(IDR_HELP_MENU));
210 } 210 }
211 211
212 AddItemWithStringId(IDC_FEEDBACK, IDS_FEEDBACK); 212 AddItemWithStringId(IDC_FEEDBACK, IDS_FEEDBACK);
(...skipping 579 matching lines...) Expand 10 before | Expand all | Expand 10 after
792 &enable_increment, &enable_decrement); 792 &enable_increment, &enable_decrement);
793 } 793 }
794 zoom_label_ = l10n_util::GetStringFUTF16( 794 zoom_label_ = l10n_util::GetStringFUTF16(
795 IDS_ZOOM_PERCENT, base::IntToString16(zoom_percent)); 795 IDS_ZOOM_PERCENT, base::IntToString16(zoom_percent));
796 } 796 }
797 797
798 void WrenchMenuModel::OnZoomLevelChanged( 798 void WrenchMenuModel::OnZoomLevelChanged(
799 const content::HostZoomMap::ZoomLevelChange& change) { 799 const content::HostZoomMap::ZoomLevelChange& change) {
800 UpdateZoomControls(); 800 UpdateZoomControls();
801 } 801 }
OLDNEW
« no previous file with comments | « chrome/app/generated_resources.grd ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698