diff options
author | chaitanyag@chromium.org <chaitanyag@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-04-14 20:32:28 +0000 |
---|---|---|
committer | chaitanyag@chromium.org <chaitanyag@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-04-14 20:32:28 +0000 |
commit | ecaa8009f2f44ea46ec3fafc1cf608099f9a2caa (patch) | |
tree | e9663520634e8ff76eb8384f9d3e20fc693787c8 /chrome/browser/ui/views/accessibility_event_router_views.cc | |
parent | b8a3ba4e12945fde4492aaed61e2ddb8daba79c5 (diff) | |
download | chromium_src-ecaa8009f2f44ea46ec3fafc1cf608099f9a2caa.zip chromium_src-ecaa8009f2f44ea46ec3fafc1cf608099f9a2caa.tar.gz chromium_src-ecaa8009f2f44ea46ec3fafc1cf608099f9a2caa.tar.bz2 |
Make the usage stats checkbox on EULA screen speak and focus.
BUG=chromium-os:14128
TEST=Test manually, see issue 14128
Review URL: http://codereview.chromium.org/6852008
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@81636 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/ui/views/accessibility_event_router_views.cc')
-rw-r--r-- | chrome/browser/ui/views/accessibility_event_router_views.cc | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/chrome/browser/ui/views/accessibility_event_router_views.cc b/chrome/browser/ui/views/accessibility_event_router_views.cc index bfbd3ff..ca5d4fc 100644 --- a/chrome/browser/ui/views/accessibility_event_router_views.cc +++ b/chrome/browser/ui/views/accessibility_event_router_views.cc @@ -15,6 +15,7 @@ #include "content/common/notification_type.h" #include "ui/base/models/combobox_model.h" #include "ui/base/accessibility/accessible_view_state.h" +#include "views/controls/button/checkbox.h" #include "views/controls/button/custom_button.h" #include "views/controls/button/menu_button.h" #include "views/controls/button/native_button.h" @@ -141,7 +142,10 @@ void AccessibilityEventRouterViews::DispatchAccessibilityNotification( most_recent_profile_ = profile; std::string class_name = view->GetClassName(); - if (class_name == views::MenuButton::kViewClassName || + + if (class_name == views::Checkbox::kViewClassName) { + SendCheckboxNotification(view, type, profile); + } else if (class_name == views::MenuButton::kViewClassName || type == NotificationType::ACCESSIBILITY_MENU_OPENED || type == NotificationType::ACCESSIBILITY_MENU_CLOSED) { SendMenuNotification(view, type, profile); @@ -278,3 +282,15 @@ void AccessibilityEventRouterViews::SendComboboxNotification( profile, name, value, state.index, state.count); SendAccessibilityNotification(type, &info); } + +void AccessibilityEventRouterViews::SendCheckboxNotification( + views::View* view, NotificationType type, Profile* profile) { + ui::AccessibleViewState state; + view->GetAccessibleState(&state); + std::string name = UTF16ToUTF8(state.name); + std::string value = UTF16ToUTF8(state.value); + AccessibilityCheckboxInfo info( + profile, name, state.state == ui::AccessibilityTypes::STATE_CHECKED); + SendAccessibilityNotification(type, &info); +} + |