OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 441 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
452 | 452 |
453 AddSeparator(); | 453 AddSeparator(); |
454 | 454 |
455 bookmark_sub_menu_model_.reset(new BookmarkSubMenuModel(this, browser_)); | 455 bookmark_sub_menu_model_.reset(new BookmarkSubMenuModel(this, browser_)); |
456 AddSubMenuWithStringId(IDC_BOOKMARKS_MENU, IDS_BOOKMARKS_MENU, | 456 AddSubMenuWithStringId(IDC_BOOKMARKS_MENU, IDS_BOOKMARKS_MENU, |
457 bookmark_sub_menu_model_.get()); | 457 bookmark_sub_menu_model_.get()); |
458 AddItemWithStringId(IDC_SHOW_HISTORY, IDS_SHOW_HISTORY); | 458 AddItemWithStringId(IDC_SHOW_HISTORY, IDS_SHOW_HISTORY); |
459 AddItemWithStringId(IDC_SHOW_DOWNLOADS, IDS_SHOW_DOWNLOADS); | 459 AddItemWithStringId(IDC_SHOW_DOWNLOADS, IDS_SHOW_DOWNLOADS); |
460 AddSeparator(); | 460 AddSeparator(); |
461 | 461 |
| 462 #if !defined(OS_CHROMEOS) |
| 463 const string16 short_product_name = |
| 464 l10n_util::GetStringUTF16(IDS_SHORT_PRODUCT_NAME); |
| 465 AddItem(IDC_SHOW_SYNC_SETUP, l10n_util::GetStringFUTF16( |
| 466 IDS_SHOW_SYNC_SETUP, short_product_name)); |
| 467 AddSeparator(); |
| 468 #endif |
| 469 |
462 #if defined(OS_CHROMEOS) | 470 #if defined(OS_CHROMEOS) |
463 AddItemWithStringId(IDC_OPTIONS, IDS_SETTINGS); | 471 AddItemWithStringId(IDC_OPTIONS, IDS_SETTINGS); |
464 #elif defined(OS_MACOSX) | 472 #elif defined(OS_MACOSX) |
465 AddItemWithStringId(IDC_OPTIONS, IDS_PREFERENCES); | 473 AddItemWithStringId(IDC_OPTIONS, IDS_PREFERENCES); |
466 #elif defined(TOOLKIT_USES_GTK) | 474 #elif defined(TOOLKIT_USES_GTK) |
467 string16 preferences = gtk_util::GetStockPreferencesMenuLabel(); | 475 string16 preferences = gtk_util::GetStockPreferencesMenuLabel(); |
468 if (!preferences.empty()) | 476 if (!preferences.empty()) |
469 AddItem(IDC_OPTIONS, preferences); | 477 AddItem(IDC_OPTIONS, preferences); |
470 else | 478 else |
471 AddItemWithStringId(IDC_OPTIONS, IDS_PREFERENCES); | 479 AddItemWithStringId(IDC_OPTIONS, IDS_PREFERENCES); |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
544 &enable_increment, &enable_decrement); | 552 &enable_increment, &enable_decrement); |
545 } | 553 } |
546 zoom_label_ = l10n_util::GetStringFUTF16( | 554 zoom_label_ = l10n_util::GetStringFUTF16( |
547 IDS_ZOOM_PERCENT, base::IntToString16(zoom_percent)); | 555 IDS_ZOOM_PERCENT, base::IntToString16(zoom_percent)); |
548 } | 556 } |
549 | 557 |
550 string16 WrenchMenuModel::GetSyncMenuLabel() const { | 558 string16 WrenchMenuModel::GetSyncMenuLabel() const { |
551 return sync_ui_util::GetSyncMenuLabel( | 559 return sync_ui_util::GetSyncMenuLabel( |
552 browser_->profile()->GetOriginalProfile()->GetProfileSyncService()); | 560 browser_->profile()->GetOriginalProfile()->GetProfileSyncService()); |
553 } | 561 } |
OLD | NEW |