| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "content/browser/accessibility/browser_accessibility_manager_mac.h" | 5 #include "content/browser/accessibility/browser_accessibility_manager_mac.h" |
| 6 | 6 |
| 7 #import "base/mac/mac_util.h" | 7 #import "base/mac/mac_util.h" |
| 8 #import "base/mac/sdk_forward_declarations.h" | 8 #import "base/mac/sdk_forward_declarations.h" |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/strings/sys_string_conversions.h" | 10 #include "base/strings/sys_string_conversions.h" |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 NSString* const NSAccessibilityAutocorrectionOccurredNotification = | 60 NSString* const NSAccessibilityAutocorrectionOccurredNotification = |
| 61 @"AXAutocorrectionOccurred"; | 61 @"AXAutocorrectionOccurred"; |
| 62 NSString* const NSAccessibilityLayoutCompleteNotification = | 62 NSString* const NSAccessibilityLayoutCompleteNotification = |
| 63 @"AXLayoutComplete"; | 63 @"AXLayoutComplete"; |
| 64 NSString* const NSAccessibilityLoadCompleteNotification = | 64 NSString* const NSAccessibilityLoadCompleteNotification = |
| 65 @"AXLoadComplete"; | 65 @"AXLoadComplete"; |
| 66 NSString* const NSAccessibilityInvalidStatusChangedNotification = | 66 NSString* const NSAccessibilityInvalidStatusChangedNotification = |
| 67 @"AXInvalidStatusChanged"; | 67 @"AXInvalidStatusChanged"; |
| 68 NSString* const NSAccessibilityLiveRegionChangedNotification = | 68 NSString* const NSAccessibilityLiveRegionChangedNotification = |
| 69 @"AXLiveRegionChanged"; | 69 @"AXLiveRegionChanged"; |
| 70 NSString* const NSAccessibilityExpandedChanged = |
| 71 @"AXExpandedChanged"; |
| 70 NSString* const NSAccessibilityMenuItemSelectedNotification = | 72 NSString* const NSAccessibilityMenuItemSelectedNotification = |
| 71 @"AXMenuItemSelected"; | 73 @"AXMenuItemSelected"; |
| 72 | 74 |
| 73 // Attributes used for NSAccessibilitySelectedTextChangedNotification and | 75 // Attributes used for NSAccessibilitySelectedTextChangedNotification and |
| 74 // NSAccessibilityValueChangedNotification. | 76 // NSAccessibilityValueChangedNotification. |
| 75 NSString* const NSAccessibilityTextStateChangeTypeKey = | 77 NSString* const NSAccessibilityTextStateChangeTypeKey = |
| 76 @"AXTextStateChangeType"; | 78 @"AXTextStateChangeType"; |
| 77 NSString* const NSAccessibilityTextStateSyncKey = @"AXTextStateSync"; | 79 NSString* const NSAccessibilityTextStateSyncKey = @"AXTextStateSync"; |
| 78 NSString* const NSAccessibilityTextSelectionDirection = | 80 NSString* const NSAccessibilityTextSelectionDirection = |
| 79 @"AXTextSelectionDirection"; | 81 @"AXTextSelectionDirection"; |
| (...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 265 break; | 267 break; |
| 266 case ui::AX_EVENT_ROW_COUNT_CHANGED: | 268 case ui::AX_EVENT_ROW_COUNT_CHANGED: |
| 267 mac_notification = NSAccessibilityRowCountChangedNotification; | 269 mac_notification = NSAccessibilityRowCountChangedNotification; |
| 268 break; | 270 break; |
| 269 case ui::AX_EVENT_ROW_EXPANDED: | 271 case ui::AX_EVENT_ROW_EXPANDED: |
| 270 mac_notification = NSAccessibilityRowExpandedNotification; | 272 mac_notification = NSAccessibilityRowExpandedNotification; |
| 271 break; | 273 break; |
| 272 case ui::AX_EVENT_ROW_COLLAPSED: | 274 case ui::AX_EVENT_ROW_COLLAPSED: |
| 273 mac_notification = NSAccessibilityRowCollapsedNotification; | 275 mac_notification = NSAccessibilityRowCollapsedNotification; |
| 274 break; | 276 break; |
| 275 // TODO(nektar): Add events for busy and expanded changed. | 277 // TODO(nektar): Add events for busy. |
| 278 case ui::AX_EVENT_EXPANDED_CHANGED: |
| 279 mac_notification = NSAccessibilityExpandedChanged; |
| 280 break; |
| 276 // TODO(nektar): Support menu open/close notifications. | 281 // TODO(nektar): Support menu open/close notifications. |
| 277 case ui::AX_EVENT_MENU_LIST_ITEM_SELECTED: | 282 case ui::AX_EVENT_MENU_LIST_ITEM_SELECTED: |
| 278 mac_notification = NSAccessibilityMenuItemSelectedNotification; | 283 mac_notification = NSAccessibilityMenuItemSelectedNotification; |
| 279 break; | 284 break; |
| 280 | 285 |
| 281 // These events are not used on Mac for now. | 286 // These events are not used on Mac for now. |
| 282 case ui::AX_EVENT_ALERT: | 287 case ui::AX_EVENT_ALERT: |
| 283 case ui::AX_EVENT_TEXT_CHANGED: | 288 case ui::AX_EVENT_TEXT_CHANGED: |
| 284 case ui::AX_EVENT_CHILDREN_CHANGED: | 289 case ui::AX_EVENT_CHILDREN_CHANGED: |
| 285 case ui::AX_EVENT_MENU_LIST_VALUE_CHANGED: | 290 case ui::AX_EVENT_MENU_LIST_VALUE_CHANGED: |
| (...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 456 } | 461 } |
| 457 | 462 |
| 458 return @{ | 463 return @{ |
| 459 NSAccessibilityTextStateChangeTypeKey : @(AXTextStateChangeTypeEdit), | 464 NSAccessibilityTextStateChangeTypeKey : @(AXTextStateChangeTypeEdit), |
| 460 NSAccessibilityTextChangeValues : changes, | 465 NSAccessibilityTextChangeValues : changes, |
| 461 NSAccessibilityTextChangeElement : native_node | 466 NSAccessibilityTextChangeElement : native_node |
| 462 }; | 467 }; |
| 463 } | 468 } |
| 464 | 469 |
| 465 } // namespace content | 470 } // namespace content |
| OLD | NEW |