Chromium Code Reviews| Index: chrome/browser/ui/views/accessibility/accessibility_event_router_views.cc |
| diff --git a/chrome/browser/ui/views/accessibility/accessibility_event_router_views.cc b/chrome/browser/ui/views/accessibility/accessibility_event_router_views.cc |
| index bab270e451dbfd7a048f84fac5164b7dbeadcdb0..1534108f23f61d51fb95efad0d1f82629194eb76 100644 |
| --- a/chrome/browser/ui/views/accessibility/accessibility_event_router_views.cc |
| +++ b/chrome/browser/ui/views/accessibility/accessibility_event_router_views.cc |
| @@ -209,6 +209,9 @@ void AccessibilityEventRouterViews::DispatchAccessibilityEvent( |
| case ui::AX_ROLE_SLIDER: |
| SendSliderNotification(view, type, profile); |
| break; |
| + case ui::AX_ROLE_TAB: |
| + SendTabNotification(view, type, profile); |
| + break; |
| case ui::AX_ROLE_TREE: |
| SendTreeNotification(view, type, profile); |
| break; |
| @@ -286,6 +289,19 @@ void AccessibilityEventRouterViews::SendMenuItemNotification( |
| } |
| // static |
| +void AccessibilityEventRouterViews::SendTabNotification( |
| + views::View* view, |
| + ui::AXEvent event, |
| + Profile* profile) { |
| + ui::AXViewState state; |
| + view->GetAccessibleState(&state); |
| + std::string name = base::UTF16ToUTF8(state.name); |
| + std::string context = GetViewContext(view); |
|
Peter Kasting
2014/07/16 23:40:54
Nit: I suggest inlining these two below to avoid t
evy
2014/07/21 17:54:15
This pattern was actually copied from another func
Peter Kasting
2014/07/21 19:06:07
You can if you want. It doesn't matter much to me
|
| + AccessibilityTabInfo info(profile, name, context, state.index, state.count); |
| + SendControlAccessibilityNotification(event, &info); |
| +} |
| + |
| +// static |
| void AccessibilityEventRouterViews::SendTreeNotification( |
| views::View* view, |
| ui::AXEvent event, |