OLD | NEW |
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 Loading... |
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 Loading... |
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 } |
OLD | NEW |