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

Unified Diff: content/browser/accessibility/browser_accessibility_manager_mac.mm

Issue 7745035: Add a big grab bag of missing web accessibility functionality... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 4 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: content/browser/accessibility/browser_accessibility_manager_mac.mm
===================================================================
--- content/browser/accessibility/browser_accessibility_manager_mac.mm (revision 98956)
+++ content/browser/accessibility/browser_accessibility_manager_mac.mm (working copy)
@@ -32,30 +32,68 @@
// Refer to AXObjectCache.mm (webkit).
NSString* event_id = @"";
switch (type) {
- case ViewHostMsg_AccessibilityNotification_Type::
- NOTIFICATION_TYPE_CHECK_STATE_CHANGED:
- // Does not exist on Mac.
+ case ViewHostMsg_AccEvent::ACTIVE_DESCENDANT_CHANGED:
+ if (node->role() == WebAccessibility::ROLE_TREE)
+ event_id = NSAccessibilitySelectedRowsChangedNotification;
+ else
+ event_id = NSAccessibilityFocusedUIElementChangedNotification;
+ case ViewHostMsg_AccEvent::ALERT:
+ // Not used on Mac.
return;
- case ViewHostMsg_AccessibilityNotification_Type::
- NOTIFICATION_TYPE_CHILDREN_CHANGED:
+ case ViewHostMsg_AccEvent::CHECK_STATE_CHANGED:
+ // Not used on Mac.
+ return;
+ case ViewHostMsg_AccEvent::CHILDREN_CHANGED:
// TODO(dtseng): no clear equivalent on Mac.
return;
- case ViewHostMsg_AccessibilityNotification_Type::
- NOTIFICATION_TYPE_FOCUS_CHANGED:
+ case ViewHostMsg_AccEvent::FOCUS_CHANGED:
event_id = NSAccessibilityFocusedUIElementChangedNotification;
break;
- case ViewHostMsg_AccessibilityNotification_Type::
- NOTIFICATION_TYPE_LOAD_COMPLETE:
+ case ViewHostMsg_AccEvent::LAYOUT_COMPLETE:
+ event_id = @"AXLayoutComplete";
+ break;
+ case ViewHostMsg_AccEvent::LIVE_REGION_CHANGED:
+ event_id = @"AXLiveRegionChanged";
+ break;
+ case ViewHostMsg_AccEvent::LOAD_COMPLETE:
event_id = @"AXLoadComplete";
break;
- case ViewHostMsg_AccessibilityNotification_Type::
- NOTIFICATION_TYPE_VALUE_CHANGED:
- event_id = NSAccessibilityValueChangedNotification;
+ case ViewHostMsg_AccEvent::MENU_LIST_VALUE_CHANGED:
+ // Not used on Mac.
+ return;
+ case ViewHostMsg_AccEvent::OBJECT_SHOW:
+ // Not used on Mac.
+ return;
+ case ViewHostMsg_AccEvent::OBJECT_HIDE:
+ // Not used on Mac.
+ return;
+ case ViewHostMsg_AccEvent::ROW_COUNT_CHANGED:
+ event_id = NSAccessibilityRowCountChangedNotification;
break;
- case ViewHostMsg_AccessibilityNotification_Type::
- NOTIFICATION_TYPE_SELECTED_TEXT_CHANGED:
+ case ViewHostMsg_AccEvent::ROW_COLLAPSED:
+ event_id = @"AXRowCollapsed";
+ break;
+ case ViewHostMsg_AccEvent::ROW_EXPANDED:
+ event_id = @"AXRowExpanded";
+ break;
+ case ViewHostMsg_AccEvent::SCROLLED_TO_ANCHOR:
+ // Not used on Mac.
+ return;
+ case ViewHostMsg_AccEvent::SELECTED_CHILDREN_CHANGED:
+ event_id = NSAccessibilitySelectedChildrenChangedNotification;
+ break;
+ case ViewHostMsg_AccEvent::SELECTED_TEXT_CHANGED:
event_id = NSAccessibilitySelectedTextChangedNotification;
break;
+ case ViewHostMsg_AccEvent::TEXT_INSERTED:
+ // Not used on Mac.
+ return;
+ case ViewHostMsg_AccEvent::TEXT_REMOVED:
+ // Not used on Mac.
+ return;
+ case ViewHostMsg_AccEvent::VALUE_CHANGED:
+ event_id = NSAccessibilityValueChangedNotification;
+ break;
}
BrowserAccessibilityCocoa* native_node = node->toBrowserAccessibilityCocoa();
DCHECK(native_node);

Powered by Google App Engine
This is Rietveld 408576698