OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/wrench_menu_model.h" | 5 #include "chrome/browser/wrench_menu_model.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <cmath> | 8 #include <cmath> |
9 | 9 |
10 #include "app/l10n_util.h" | 10 #include "app/l10n_util.h" |
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
302 AddItemWithStringId(IDC_SHOW_DOWNLOADS, IDS_SHOW_DOWNLOADS); | 302 AddItemWithStringId(IDC_SHOW_DOWNLOADS, IDS_SHOW_DOWNLOADS); |
303 AddSeparator(); | 303 AddSeparator(); |
304 | 304 |
305 #if defined(OS_MACOSX) | 305 #if defined(OS_MACOSX) |
306 AddItemWithStringId(IDC_OPTIONS, IDS_PREFERENCES_MAC); | 306 AddItemWithStringId(IDC_OPTIONS, IDS_PREFERENCES_MAC); |
307 #else | 307 #else |
308 AddItemWithStringId(IDC_OPTIONS, IDS_OPTIONS); | 308 AddItemWithStringId(IDC_OPTIONS, IDS_OPTIONS); |
309 #endif | 309 #endif |
310 | 310 |
311 #if defined(OS_CHROMEOS) | 311 #if defined(OS_CHROMEOS) |
312 AddItemWithStringId(IDC_TOGGLE_VERTICAL_TABS, | 312 AddCheckItemWithStringId(IDC_TOGGLE_VERTICAL_TABS, |
313 IDS_TAB_CXMENU_USE_VERTICAL_TABS); | 313 IDS_TAB_CXMENU_USE_VERTICAL_TABS); |
314 #endif | 314 #endif |
315 | 315 |
316 // On Mac, there is no About item unless it is replaced with the update | 316 // On Mac, there is no About item unless it is replaced with the update |
317 // available notification. | 317 // available notification. |
318 if (browser_defaults::kShowAboutMenuItem || | 318 if (browser_defaults::kShowAboutMenuItem || |
319 Singleton<UpgradeDetector>::get()->notify_upgrade()) { | 319 Singleton<UpgradeDetector>::get()->notify_upgrade()) { |
320 AddItem(IDC_ABOUT, | 320 AddItem(IDC_ABOUT, |
321 l10n_util::GetStringFUTF16( | 321 l10n_util::GetStringFUTF16( |
322 IDS_ABOUT, | 322 IDS_ABOUT, |
323 l10n_util::GetStringUTF16(IDS_PRODUCT_NAME))); | 323 l10n_util::GetStringUTF16(IDS_PRODUCT_NAME))); |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
389 } | 389 } |
390 return l10n_util::GetStringFUTF16( | 390 return l10n_util::GetStringFUTF16( |
391 IDS_ABOUT, l10n_util::GetStringUTF16(IDS_PRODUCT_NAME)); | 391 IDS_ABOUT, l10n_util::GetStringUTF16(IDS_PRODUCT_NAME)); |
392 } | 392 } |
393 | 393 |
394 bool WrenchMenuModel::IsDynamicItem(int index) const { | 394 bool WrenchMenuModel::IsDynamicItem(int index) const { |
395 int command_id = GetCommandIdAt(index); | 395 int command_id = GetCommandIdAt(index); |
396 return command_id == IDC_SYNC_BOOKMARKS || | 396 return command_id == IDC_SYNC_BOOKMARKS || |
397 command_id == IDC_ABOUT; | 397 command_id == IDC_ABOUT; |
398 } | 398 } |
OLD | NEW |