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 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
194 : SimpleMenuModel(delegate) { | 194 : SimpleMenuModel(delegate) { |
195 Build(browser); | 195 Build(browser); |
196 } | 196 } |
197 virtual ~HelpMenuModel() { | 197 virtual ~HelpMenuModel() { |
198 } | 198 } |
199 | 199 |
200 private: | 200 private: |
201 void Build(Browser* browser) { | 201 void Build(Browser* browser) { |
202 int help_string_id = IDS_HELP_PAGE; | 202 int help_string_id = IDS_HELP_PAGE; |
203 #if defined(OS_CHROMEOS) && defined(OFFICIAL_BUILD) | 203 #if defined(OS_CHROMEOS) && defined(OFFICIAL_BUILD) |
204 if (!CommandLine::ForCurrentProcess()->HasSwitch( | 204 help_string_id = IDS_GET_HELP; |
205 chromeos::switches::kDisableGeniusApp)) { | 205 #else |
sky
2014/09/18 13:03:24
This isn't the same as the old code. I was saying
cylee1
2014/09/18 13:25:59
sorry, mistake...
| |
206 help_string_id = IDS_GET_HELP; | |
207 } | |
208 #endif | |
209 AddItemWithStringId(IDC_HELP_PAGE_VIA_MENU, help_string_id); | 206 AddItemWithStringId(IDC_HELP_PAGE_VIA_MENU, help_string_id); |
210 if (browser_defaults::kShowHelpMenuItemIcon) { | 207 if (browser_defaults::kShowHelpMenuItemIcon) { |
211 ui::ResourceBundle& rb = ResourceBundle::GetSharedInstance(); | 208 ui::ResourceBundle& rb = ResourceBundle::GetSharedInstance(); |
212 SetIcon(GetIndexOfCommandId(IDC_HELP_PAGE_VIA_MENU), | 209 SetIcon(GetIndexOfCommandId(IDC_HELP_PAGE_VIA_MENU), |
213 rb.GetNativeImageNamed(IDR_HELP_MENU)); | 210 rb.GetNativeImageNamed(IDR_HELP_MENU)); |
214 } | 211 } |
215 | 212 |
216 AddItemWithStringId(IDC_FEEDBACK, IDS_FEEDBACK); | 213 AddItemWithStringId(IDC_FEEDBACK, IDS_FEEDBACK); |
214 #endif | |
217 } | 215 } |
218 | 216 |
219 DISALLOW_COPY_AND_ASSIGN(HelpMenuModel); | 217 DISALLOW_COPY_AND_ASSIGN(HelpMenuModel); |
220 }; | 218 }; |
221 | 219 |
222 #endif // defined(GOOGLE_CHROME_BUILD) | 220 #endif // defined(GOOGLE_CHROME_BUILD) |
223 | 221 |
224 //////////////////////////////////////////////////////////////////////////////// | 222 //////////////////////////////////////////////////////////////////////////////// |
225 // ToolsMenuModel | 223 // ToolsMenuModel |
226 | 224 |
(...skipping 558 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
785 ->GetZoomPercent(); | 783 ->GetZoomPercent(); |
786 } | 784 } |
787 zoom_label_ = l10n_util::GetStringFUTF16( | 785 zoom_label_ = l10n_util::GetStringFUTF16( |
788 IDS_ZOOM_PERCENT, base::IntToString16(zoom_percent)); | 786 IDS_ZOOM_PERCENT, base::IntToString16(zoom_percent)); |
789 } | 787 } |
790 | 788 |
791 void WrenchMenuModel::OnZoomLevelChanged( | 789 void WrenchMenuModel::OnZoomLevelChanged( |
792 const content::HostZoomMap::ZoomLevelChange& change) { | 790 const content::HostZoomMap::ZoomLevelChange& change) { |
793 UpdateZoomControls(); | 791 UpdateZoomControls(); |
794 } | 792 } |
OLD | NEW |