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

Unified Diff: chrome/browser/ui/views/accessibility_event_router_views.cc

Issue 9665026: Make views Slider accessible on Chrome OS (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Change value to stringValue Created 8 years, 9 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
Index: chrome/browser/ui/views/accessibility_event_router_views.cc
diff --git a/chrome/browser/ui/views/accessibility_event_router_views.cc b/chrome/browser/ui/views/accessibility_event_router_views.cc
index c4e465845035cce481eda2435cbf8c1a082f507f..92f7a472bbaf9b25d43a0402c823d7bd79eb7734 100644
--- a/chrome/browser/ui/views/accessibility_event_router_views.cc
+++ b/chrome/browser/ui/views/accessibility_event_router_views.cc
@@ -164,6 +164,9 @@ void AccessibilityEventRouterViews::DispatchAccessibilityNotification(
break;
case ui::AccessibilityTypes::ROLE_RADIOBUTTON:
// Not used anymore?
+ case ui::AccessibilityTypes::ROLE_SLIDER:
+ SendSliderNotification(view, type, profile);
+ break;
default:
// If this is encountered, please file a bug with the role that wasn't
// caught so we can add accessibility extension API support.
@@ -302,6 +305,25 @@ void AccessibilityEventRouterViews::SendWindowNotification(
}
// static
+void AccessibilityEventRouterViews::SendSliderNotification(
+ views::View* view,
+ int type,
+ Profile* profile) {
+ ui::AccessibleViewState state;
+ view->GetAccessibleState(&state);
+
+ std::string name = UTF16ToUTF8(state.name);
+ std::string value = UTF16ToUTF8(state.value);
+ std::string context = GetViewContext(view);
+ AccessibilitySliderInfo info(
+ profile,
+ name,
+ context,
+ value);
+ SendAccessibilityNotification(type, &info);
+}
+
+// static
std::string AccessibilityEventRouterViews::GetViewName(views::View* view) {
ui::AccessibleViewState state;
view->GetAccessibleState(&state);

Powered by Google App Engine
This is Rietveld 408576698