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 651 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
662 #endif | 662 #endif |
663 | 663 |
664 AddGlobalErrorMenuItems(); | 664 AddGlobalErrorMenuItems(); |
665 | 665 |
666 if (is_new_menu) { | 666 if (is_new_menu) { |
667 AddSubMenuWithStringId(IDC_ZOOM_MENU, IDS_MORE_TOOLS_MENU, | 667 AddSubMenuWithStringId(IDC_ZOOM_MENU, IDS_MORE_TOOLS_MENU, |
668 tools_menu_model_.get()); | 668 tools_menu_model_.get()); |
669 } | 669 } |
670 | 670 |
671 bool show_exit_menu = browser_defaults::kShowExitMenuItem; | 671 bool show_exit_menu = browser_defaults::kShowExitMenuItem; |
672 #if defined(OS_WIN) && defined(USE_AURA) | 672 #if defined(OS_WIN) |
673 if (browser_->host_desktop_type() == chrome::HOST_DESKTOP_TYPE_ASH) | 673 if (browser_->host_desktop_type() == chrome::HOST_DESKTOP_TYPE_ASH) |
674 show_exit_menu = false; | 674 show_exit_menu = false; |
675 #endif | 675 #endif |
676 | 676 |
677 if (show_exit_menu) { | 677 if (show_exit_menu) { |
678 AddSeparator(ui::NORMAL_SEPARATOR); | 678 AddSeparator(ui::NORMAL_SEPARATOR); |
679 AddItemWithStringId(IDC_EXIT, IDS_EXIT); | 679 AddItemWithStringId(IDC_EXIT, IDS_EXIT); |
680 } | 680 } |
681 } | 681 } |
682 | 682 |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
787 &enable_increment, &enable_decrement); | 787 &enable_increment, &enable_decrement); |
788 } | 788 } |
789 zoom_label_ = l10n_util::GetStringFUTF16( | 789 zoom_label_ = l10n_util::GetStringFUTF16( |
790 IDS_ZOOM_PERCENT, base::IntToString16(zoom_percent)); | 790 IDS_ZOOM_PERCENT, base::IntToString16(zoom_percent)); |
791 } | 791 } |
792 | 792 |
793 void WrenchMenuModel::OnZoomLevelChanged( | 793 void WrenchMenuModel::OnZoomLevelChanged( |
794 const content::HostZoomMap::ZoomLevelChange& change) { | 794 const content::HostZoomMap::ZoomLevelChange& change) { |
795 UpdateZoomControls(); | 795 UpdateZoomControls(); |
796 } | 796 } |
OLD | NEW |