summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorctguil@chromium.org <ctguil@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-23 16:28:53 +0000
committerctguil@chromium.org <ctguil@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-23 16:28:53 +0000
commitf9204f0406b921905380f7e385bfdd41fb23a401 (patch)
tree8782e47699872272ceebb9893289b34b68da1f82
parentd9a35580a9ce5b119f6e69daa7a221d9188e4eec (diff)
downloadchromium_src-f9204f0406b921905380f7e385bfdd41fb23a401.zip
chromium_src-f9204f0406b921905380f7e385bfdd41fb23a401.tar.gz
chromium_src-f9204f0406b921905380f7e385bfdd41fb23a401.tar.bz2
views: [accessibility] Add accessible names for Minimize, Maximize, Restore buttons in the top right corner of the Window.
BUG=9614 TEST=TEST=open AccExplorer, open the main chrome window, point it to one of the three buttons in the top-right corner, see if it shows the correct accessible names for each one. Patch from Thiago Farina <thiago.farina@gmail.com> Review URL: http://codereview.chromium.org/1076009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@42349 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--app/resources/app_strings.grd9
-rw-r--r--views/window/custom_frame_view.cc6
2 files changed, 15 insertions, 0 deletions
diff --git a/app/resources/app_strings.grd b/app/resources/app_strings.grd
index 5d79362..42d19c6 100644
--- a/app/resources/app_strings.grd
+++ b/app/resources/app_strings.grd
@@ -204,6 +204,15 @@ need to be translated for each locale.-->
<message name="IDS_APP_ACCNAME_CLOSE" desc="The accessible name for the Close button.">
Close
</message>
+ <message name="IDS_APP_ACCNAME_MINIMIZE" desc="The accessible name for the Minimize button.">
+ Minimize
+ </message>
+ <message name="IDS_APP_ACCNAME_MAXIMIZE" desc="The accessible name for the Maximize button.">
+ Maximize
+ </message>
+ <message name="IDS_APP_ACCNAME_RESTORE" desc="The accessible name for the Restore button.">
+ Restore
+ </message>
<!-- Scroll Bar Context Menu Labels -->
<message name="IDS_APP_SCROLLBAR_CXMENU_SCROLLHERE" desc="The label for the 'Scroll Here' item">
diff --git a/views/window/custom_frame_view.cc b/views/window/custom_frame_view.cc
index cf0fc49..1598bdd 100644
--- a/views/window/custom_frame_view.cc
+++ b/views/window/custom_frame_view.cc
@@ -79,6 +79,8 @@ CustomFrameView::CustomFrameView(Window* frame)
// Close button images will be set in LayoutWindowControls().
AddChildView(close_button_);
+ restore_button_->SetAccessibleName(
+ l10n_util::GetString(IDS_APP_ACCNAME_RESTORE));
restore_button_->SetImage(CustomButton::BS_NORMAL,
rb.GetBitmapNamed(IDR_RESTORE));
restore_button_->SetImage(CustomButton::BS_HOT,
@@ -87,6 +89,8 @@ CustomFrameView::CustomFrameView(Window* frame)
rb.GetBitmapNamed(IDR_RESTORE_P));
AddChildView(restore_button_);
+ maximize_button_->SetAccessibleName(
+ l10n_util::GetString(IDS_APP_ACCNAME_MAXIMIZE));
maximize_button_->SetImage(CustomButton::BS_NORMAL,
rb.GetBitmapNamed(IDR_MAXIMIZE));
maximize_button_->SetImage(CustomButton::BS_HOT,
@@ -95,6 +99,8 @@ CustomFrameView::CustomFrameView(Window* frame)
rb.GetBitmapNamed(IDR_MAXIMIZE_P));
AddChildView(maximize_button_);
+ minimize_button_->SetAccessibleName(
+ l10n_util::GetString(IDS_APP_ACCNAME_MINIMIZE));
minimize_button_->SetImage(CustomButton::BS_NORMAL,
rb.GetBitmapNamed(IDR_MINIMIZE));
minimize_button_->SetImage(CustomButton::BS_HOT,