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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 #endif | 74 #endif |
75 | 75 |
76 using base::UserMetricsAction; | 76 using base::UserMetricsAction; |
77 using content::HostZoomMap; | 77 using content::HostZoomMap; |
78 using content::WebContents; | 78 using content::WebContents; |
79 | 79 |
80 namespace { | 80 namespace { |
81 // Conditionally return the update app menu item title based on upgrade detector | 81 // Conditionally return the update app menu item title based on upgrade detector |
82 // state. | 82 // state. |
83 base::string16 GetUpgradeDialogMenuItemName() { | 83 base::string16 GetUpgradeDialogMenuItemName() { |
84 if (UpgradeDetector::GetInstance()->is_outdated_install()) { | 84 if (UpgradeDetector::GetInstance()->is_outdated_install() || |
85 return l10n_util::GetStringFUTF16( | 85 UpgradeDetector::GetInstance()->is_outdated_install_no_au()) { |
86 IDS_UPGRADE_BUBBLE_MENU_ITEM, | 86 return l10n_util::GetStringUTF16(IDS_UPGRADE_BUBBLE_MENU_ITEM); |
87 l10n_util::GetStringUTF16(IDS_SHORT_PRODUCT_NAME)); | |
88 } else { | 87 } else { |
89 return l10n_util::GetStringUTF16(IDS_UPDATE_NOW); | 88 return l10n_util::GetStringUTF16(IDS_UPDATE_NOW); |
90 } | 89 } |
91 } | 90 } |
92 | 91 |
93 } // namespace | 92 } // namespace |
94 | 93 |
95 //////////////////////////////////////////////////////////////////////////////// | 94 //////////////////////////////////////////////////////////////////////////////// |
96 // EncodingMenuModel | 95 // EncodingMenuModel |
97 | 96 |
(...skipping 686 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
784 &enable_increment, &enable_decrement); | 783 &enable_increment, &enable_decrement); |
785 } | 784 } |
786 zoom_label_ = l10n_util::GetStringFUTF16( | 785 zoom_label_ = l10n_util::GetStringFUTF16( |
787 IDS_ZOOM_PERCENT, base::IntToString16(zoom_percent)); | 786 IDS_ZOOM_PERCENT, base::IntToString16(zoom_percent)); |
788 } | 787 } |
789 | 788 |
790 void WrenchMenuModel::OnZoomLevelChanged( | 789 void WrenchMenuModel::OnZoomLevelChanged( |
791 const content::HostZoomMap::ZoomLevelChange& change) { | 790 const content::HostZoomMap::ZoomLevelChange& change) { |
792 UpdateZoomControls(); | 791 UpdateZoomControls(); |
793 } | 792 } |
OLD | NEW |