Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(900)

Unified Diff: ash/system/settings/tray_settings.cc

Issue 10078009: Add an accessible name to the restart button (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Code review fixes Created 8 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | ash/system/tray/tray_views.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/system/settings/tray_settings.cc
diff --git a/ash/system/settings/tray_settings.cc b/ash/system/settings/tray_settings.cc
index 9039fa8a9cea6c135461e1e21aaa23312c1727d1..bd67ab710d86be9bf1e994e86f9d1bee39116b19 100644
--- a/ash/system/settings/tray_settings.cc
+++ b/ash/system/settings/tray_settings.cc
@@ -37,9 +37,12 @@ class SettingsView : public ash::internal::ActionableView {
icon->SetImage(rb.GetImageNamed(IDR_AURA_UBER_TRAY_SETTINGS).ToSkBitmap());
AddChildView(icon);
- label_ = new views::Label(rb.GetLocalizedString(
- IDS_ASH_STATUS_TRAY_SETTINGS_AND_HELP));
+ string16 text = rb.GetLocalizedString(
+ IDS_ASH_STATUS_TRAY_SETTINGS_AND_HELP);
+ label_ = new views::Label(text);
AddChildView(label_);
+
+ SetAccessibleName(text);
}
virtual ~SettingsView() {}
@@ -50,14 +53,6 @@ class SettingsView : public ash::internal::ActionableView {
return true;
}
- // Overridden from views::View.
- void GetAccessibleState(ui::AccessibleViewState* state) {
- state->role = ui::AccessibilityTypes::ROLE_PUSHBUTTON;
- ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
- state->name = rb.GetLocalizedString(
- IDS_ASH_STATUS_TRAY_SETTINGS_AND_HELP);
- }
-
private:
views::Label* label_;
« no previous file with comments | « no previous file | ash/system/tray/tray_views.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698