| 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 <execinfo.h> | 5 #include <execinfo.h> |
| 6 #include <stddef.h> | 6 #include <stddef.h> |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #import "content/browser/accessibility/browser_accessibility_cocoa.h" | 9 #import "content/browser/accessibility/browser_accessibility_cocoa.h" |
| 10 | 10 |
| (...skipping 1618 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1629 return CreateTextMarker(*first_text_object, 0); | 1629 return CreateTextMarker(*first_text_object, 0); |
| 1630 } | 1630 } |
| 1631 | 1631 |
| 1632 // Returns a subrole based upon the role. | 1632 // Returns a subrole based upon the role. |
| 1633 - (NSString*) subrole { | 1633 - (NSString*) subrole { |
| 1634 if (![self instanceActive]) | 1634 if (![self instanceActive]) |
| 1635 return nil; | 1635 return nil; |
| 1636 ui::AXRole browserAccessibilityRole = [self internalRole]; | 1636 ui::AXRole browserAccessibilityRole = [self internalRole]; |
| 1637 if (browserAccessibilityRole == ui::AX_ROLE_TEXT_FIELD && | 1637 if (browserAccessibilityRole == ui::AX_ROLE_TEXT_FIELD && |
| 1638 GetState(browserAccessibility_, ui::AX_STATE_PROTECTED)) { | 1638 GetState(browserAccessibility_, ui::AX_STATE_PROTECTED)) { |
| 1639 return @"AXSecureTextField"; | 1639 return NSAccessibilitySecureTextFieldSubrole; |
| 1640 } | 1640 } |
| 1641 | 1641 |
| 1642 if (browserAccessibilityRole == ui::AX_ROLE_DESCRIPTION_LIST) | 1642 if (browserAccessibilityRole == ui::AX_ROLE_DESCRIPTION_LIST) |
| 1643 return @"AXDefinitionList"; | 1643 return NSAccessibilityDefinitionListSubrole; |
| 1644 | 1644 |
| 1645 if (browserAccessibilityRole == ui::AX_ROLE_LIST) | 1645 if (browserAccessibilityRole == ui::AX_ROLE_LIST) |
| 1646 return @"AXContentList"; | 1646 return NSAccessibilityContentListSubrole; |
| 1647 | 1647 |
| 1648 return [AXPlatformNodeCocoa nativeSubroleFromAXRole:browserAccessibilityRole]; | 1648 return [AXPlatformNodeCocoa nativeSubroleFromAXRole:browserAccessibilityRole]; |
| 1649 } | 1649 } |
| 1650 | 1650 |
| 1651 // Returns all tabs in this subtree. | 1651 // Returns all tabs in this subtree. |
| 1652 - (NSArray*)tabs { | 1652 - (NSArray*)tabs { |
| 1653 if (![self instanceActive]) | 1653 if (![self instanceActive]) |
| 1654 return nil; | 1654 return nil; |
| 1655 NSMutableArray* tabSubtree = [[[NSMutableArray alloc] init] autorelease]; | 1655 NSMutableArray* tabSubtree = [[[NSMutableArray alloc] init] autorelease]; |
| 1656 | 1656 |
| (...skipping 956 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2613 if (![self instanceActive]) | 2613 if (![self instanceActive]) |
| 2614 return [super hash]; | 2614 return [super hash]; |
| 2615 return browserAccessibility_->GetId(); | 2615 return browserAccessibility_->GetId(); |
| 2616 } | 2616 } |
| 2617 | 2617 |
| 2618 - (BOOL)accessibilityShouldUseUniqueId { | 2618 - (BOOL)accessibilityShouldUseUniqueId { |
| 2619 return YES; | 2619 return YES; |
| 2620 } | 2620 } |
| 2621 | 2621 |
| 2622 @end | 2622 @end |
| OLD | NEW |