summaryrefslogtreecommitdiffstats
path: root/chrome/browser/ui/views/toolbar_view.cc
diff options
context:
space:
mode:
authorhashimoto@chromium.org <hashimoto@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-26 13:09:33 +0000
committerhashimoto@chromium.org <hashimoto@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-26 13:09:33 +0000
commit60cf3e73195dc18482e67e58214e797a1cdc3b11 (patch)
tree458eee448a4027a45ac1a124d512b060e7592514 /chrome/browser/ui/views/toolbar_view.cc
parent75b99eb6f4707d34457edc5293372478c2275029 (diff)
downloadchromium_src-60cf3e73195dc18482e67e58214e797a1cdc3b11.zip
chromium_src-60cf3e73195dc18482e67e58214e797a1cdc3b11.tar.gz
chromium_src-60cf3e73195dc18482e67e58214e797a1cdc3b11.tar.bz2
Change wrench menu icon's accessible name to indicate available update
BUG=chromium-os:17585 TEST=Enable accessibility feature and focus on the wrench menu by pressing ALT when upgrade is available. Ensure that it speaks "update is available." Review URL: http://codereview.chromium.org/8394031 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@107338 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/ui/views/toolbar_view.cc')
-rw-r--r--chrome/browser/ui/views/toolbar_view.cc13
1 files changed, 10 insertions, 3 deletions
diff --git a/chrome/browser/ui/views/toolbar_view.cc b/chrome/browser/ui/views/toolbar_view.cc
index 106a768..74875d1 100644
--- a/chrome/browser/ui/views/toolbar_view.cc
+++ b/chrome/browser/ui/views/toolbar_view.cc
@@ -194,7 +194,7 @@ void ToolbarView::Init() {
// Add any necessary badges to the menu item based on the system state.
if (IsUpgradeRecommended() || ShouldShowIncompatibilityWarning()) {
- UpdateAppMenuBadge();
+ UpdateAppMenuState();
}
LoadImages();
@@ -424,7 +424,7 @@ void ToolbarView::Observe(int type,
case chrome::NOTIFICATION_UPGRADE_RECOMMENDED:
case chrome::NOTIFICATION_MODULE_INCOMPATIBILITY_BADGE_CHANGE:
case chrome::NOTIFICATION_GLOBAL_ERRORS_CHANGED:
- UpdateAppMenuBadge();
+ UpdateAppMenuState();
break;
#if defined(OS_WIN) && !defined(USE_AURA)
case chrome::NOTIFICATION_CRITICAL_UPGRADE_INSTALLED:
@@ -738,7 +738,14 @@ void ToolbarView::ShowCriticalNotification() {
#endif
}
-void ToolbarView::UpdateAppMenuBadge() {
+void ToolbarView::UpdateAppMenuState() {
+ string16 accname_app = l10n_util::GetStringUTF16(IDS_ACCNAME_APP);
+ if (IsUpgradeRecommended()) {
+ accname_app = l10n_util::GetStringFUTF16(
+ IDS_ACCNAME_APP_UPGRADE_RECOMMENDED, accname_app);
+ }
+ app_menu_->SetAccessibleName(accname_app);
+
app_menu_->SetIcon(GetAppMenuIcon(views::CustomButton::BS_NORMAL));
app_menu_->SetHoverIcon(GetAppMenuIcon(views::CustomButton::BS_HOT));
app_menu_->SetPushedIcon(GetAppMenuIcon(views::CustomButton::BS_PUSHED));