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 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #import "base/mac/mac_util.h" | 8 #import "base/mac/mac_util.h" |
9 #import "base/mac/scoped_nsobject.h" | 9 #import "base/mac/scoped_nsobject.h" |
10 #import "base/mac/sdk_forward_declarations.h" | 10 #import "base/mac/sdk_forward_declarations.h" |
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
204 if (IsRootTree()) { | 204 if (IsRootTree()) { |
205 mac_notification = NSAccessibilityLoadCompleteNotification; | 205 mac_notification = NSAccessibilityLoadCompleteNotification; |
206 } else { | 206 } else { |
207 mac_notification = NSAccessibilityLayoutCompleteNotification; | 207 mac_notification = NSAccessibilityLayoutCompleteNotification; |
208 } | 208 } |
209 break; | 209 break; |
210 case ui::AX_EVENT_INVALID_STATUS_CHANGED: | 210 case ui::AX_EVENT_INVALID_STATUS_CHANGED: |
211 mac_notification = NSAccessibilityInvalidStatusChangedNotification; | 211 mac_notification = NSAccessibilityInvalidStatusChangedNotification; |
212 break; | 212 break; |
213 case ui::AX_EVENT_SELECTED_CHILDREN_CHANGED: | 213 case ui::AX_EVENT_SELECTED_CHILDREN_CHANGED: |
214 if (node->GetRole() == ui::AX_ROLE_GRID || | 214 if (node->IsTableLikeRole()) { |
215 node->GetRole() == ui::AX_ROLE_TABLE) { | |
216 mac_notification = NSAccessibilitySelectedRowsChangedNotification; | 215 mac_notification = NSAccessibilitySelectedRowsChangedNotification; |
217 } else { | 216 } else { |
218 mac_notification = NSAccessibilitySelectedChildrenChangedNotification; | 217 mac_notification = NSAccessibilitySelectedChildrenChangedNotification; |
219 } | 218 } |
220 break; | 219 break; |
221 case ui::AX_EVENT_DOCUMENT_SELECTION_CHANGED: { | 220 case ui::AX_EVENT_DOCUMENT_SELECTION_CHANGED: { |
222 mac_notification = NSAccessibilitySelectedTextChangedNotification; | 221 mac_notification = NSAccessibilitySelectedTextChangedNotification; |
223 // WebKit fires a notification both on the focused object and the root. | 222 // WebKit fires a notification both on the focused object and the root. |
224 BrowserAccessibility* focus = GetFocus(); | 223 BrowserAccessibility* focus = GetFocus(); |
225 if (!focus) | 224 if (!focus) |
(...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
480 NSAccessibilityTextChangeValues : changes, | 479 NSAccessibilityTextChangeValues : changes, |
481 NSAccessibilityTextChangeElement : native_node | 480 NSAccessibilityTextChangeElement : native_node |
482 }; | 481 }; |
483 } | 482 } |
484 | 483 |
485 NSView* BrowserAccessibilityManagerMac::GetParentView() { | 484 NSView* BrowserAccessibilityManagerMac::GetParentView() { |
486 return delegate() ? delegate()->AccessibilityGetAcceleratedWidget() : nullptr; | 485 return delegate() ? delegate()->AccessibilityGetAcceleratedWidget() : nullptr; |
487 } | 486 } |
488 | 487 |
489 } // namespace content | 488 } // namespace content |
OLD | NEW |