diff options
author | yoshiki@chromium.org <yoshiki@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-05-09 12:40:17 +0000 |
---|---|---|
committer | yoshiki@chromium.org <yoshiki@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-05-09 12:40:17 +0000 |
commit | 138159917f2cf9053fe323664a4af7fa1ec8cb96 (patch) | |
tree | 672bba55c6107aaa3bdcdc0719862755461aa903 /ash | |
parent | 39f3d10a34e63bd2c20959b7d601dd0c8d7863c7 (diff) | |
download | chromium_src-138159917f2cf9053fe323664a4af7fa1ec8cb96.zip chromium_src-138159917f2cf9053fe323664a4af7fa1ec8cb96.tar.gz chromium_src-138159917f2cf9053fe323664a4af7fa1ec8cb96.tar.bz2 |
Add a "Settings..." menu item to a11y uber menu.
This patch add a "Settings..." which should go to the a11y section of chrome://settings at the right of "Learn more..." button.
BUG=178548
TEST=manual
R=stevenjb@chromium.org
Review URL: https://codereview.chromium.org/14333028
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@199196 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash')
-rw-r--r-- | ash/ash_strings.grd | 3 | ||||
-rw-r--r-- | ash/system/tray/system_tray_delegate.h | 3 | ||||
-rw-r--r-- | ash/system/tray/test_system_tray_delegate.cc | 3 | ||||
-rw-r--r-- | ash/system/tray/test_system_tray_delegate.h | 1 | ||||
-rw-r--r-- | ash/system/tray_accessibility.cc | 11 | ||||
-rw-r--r-- | ash/system/tray_accessibility.h | 1 |
6 files changed, 20 insertions, 2 deletions
diff --git a/ash/ash_strings.grd b/ash/ash_strings.grd index ff576ed..b4b7177 100644 --- a/ash/ash_strings.grd +++ b/ash/ash_strings.grd @@ -377,6 +377,9 @@ Press Shift + Alt to switch. to open a webpage (article on help center) containing explanation about accessibility feature."> Learn more... </message> + <message name="IDS_ASH_STATUS_TRAY_ACCESSIBILITY_SETTINGS" desc="The label of the item 'Settings...' used in the accessibility menu of the system tray to open an accessibility setting page."> + Settings... + </message> <message name="IDS_ASH_STATUS_TRAY_BATTERY_FULL" desc="The label in the tray dialog to indicate that the battery is full."> Battery full </message> diff --git a/ash/system/tray/system_tray_delegate.h b/ash/system/tray/system_tray_delegate.h index e5f25ec..6f88605 100644 --- a/ash/system/tray/system_tray_delegate.h +++ b/ash/system/tray/system_tray_delegate.h @@ -193,6 +193,9 @@ class SystemTrayDelegate { // Show accessilibity help. virtual void ShowAccessibilityHelp() = 0; + // Show the settings related to accessilibity. + virtual void ShowAccessibilitySettings() = 0; + // Shows more information about public account mode. virtual void ShowPublicAccountInfo() = 0; diff --git a/ash/system/tray/test_system_tray_delegate.cc b/ash/system/tray/test_system_tray_delegate.cc index a832732..89fc097 100644 --- a/ash/system/tray/test_system_tray_delegate.cc +++ b/ash/system/tray/test_system_tray_delegate.cc @@ -173,6 +173,9 @@ void TestSystemTrayDelegate::ShowHelp() { void TestSystemTrayDelegate::ShowAccessibilityHelp() { } +void TestSystemTrayDelegate::ShowAccessibilitySettings() { +} + void TestSystemTrayDelegate::ShowPublicAccountInfo() { } diff --git a/ash/system/tray/test_system_tray_delegate.h b/ash/system/tray/test_system_tray_delegate.h index 58c9825..516e424 100644 --- a/ash/system/tray/test_system_tray_delegate.h +++ b/ash/system/tray/test_system_tray_delegate.h @@ -51,6 +51,7 @@ class TestSystemTrayDelegate : public SystemTrayDelegate { virtual void ShowIMESettings() OVERRIDE; virtual void ShowHelp() OVERRIDE; virtual void ShowAccessibilityHelp() OVERRIDE; + virtual void ShowAccessibilitySettings() OVERRIDE; virtual void ShowPublicAccountInfo() OVERRIDE; virtual void ShowEnterpriseInfo() OVERRIDE; virtual void ShowLocallyManagedUserInfo() OVERRIDE; diff --git a/ash/system/tray_accessibility.cc b/ash/system/tray_accessibility.cc index 44fdc8e..b4f1823 100644 --- a/ash/system/tray_accessibility.cc +++ b/ash/system/tray_accessibility.cc @@ -108,6 +108,7 @@ AccessibilityDetailedView::AccessibilityDetailedView( high_contrast_view_(NULL), screen_magnifier_view_(NULL), help_view_(NULL), + settings_view_(NULL), spoken_feedback_enabled_(false), high_contrast_enabled_(false), screen_magnifier_enabled_(false), @@ -172,8 +173,12 @@ void AccessibilityDetailedView::AppendHelpEntries() { bottom_row->AddChildView(help); help_view_ = help; - // TODO(yoshiki): Add "Customize accessibility" button when the customize is - // available. crbug.com/158281 + TrayPopupLabelButton* settings = new TrayPopupLabelButton( + this, + bundle.GetLocalizedString( + IDS_ASH_STATUS_TRAY_ACCESSIBILITY_SETTINGS)); + bottom_row->AddChildView(settings); + settings_view_ = settings; AddChildView(bottom_row); } @@ -207,6 +212,8 @@ void AccessibilityDetailedView::ButtonPressed(views::Button* sender, Shell::GetInstance()->system_tray_delegate(); if (sender == help_view_) tray_delegate->ShowAccessibilityHelp(); + else if (sender == settings_view_) + tray_delegate->ShowAccessibilitySettings(); } } // namespace tray diff --git a/ash/system/tray_accessibility.h b/ash/system/tray_accessibility.h index cd2d729..e23f4b9 100644 --- a/ash/system/tray_accessibility.h +++ b/ash/system/tray_accessibility.h @@ -74,6 +74,7 @@ class AccessibilityDetailedView : public TrayDetailsView, views::View* high_contrast_view_; views::View* screen_magnifier_view_;; views::View* help_view_; + views::View* settings_view_; bool spoken_feedback_enabled_; bool high_contrast_enabled_; |