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 | 6 |
7 #import "content/browser/accessibility/browser_accessibility_cocoa.h" | 7 #import "content/browser/accessibility/browser_accessibility_cocoa.h" |
8 | 8 |
9 #include <map> | 9 #include <map> |
10 | 10 |
(...skipping 1012 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1023 BrowserAccessibilityManagerMac* manager = | 1023 BrowserAccessibilityManagerMac* manager = |
1024 static_cast<BrowserAccessibilityManagerMac*>( | 1024 static_cast<BrowserAccessibilityManagerMac*>( |
1025 browserAccessibility_->manager()); | 1025 browserAccessibility_->manager()); |
1026 return [manager->parent_view() window]; | 1026 return [manager->parent_view() window]; |
1027 } | 1027 } |
1028 | 1028 |
1029 - (NSString*)methodNameForAttribute:(NSString*)attribute { | 1029 - (NSString*)methodNameForAttribute:(NSString*)attribute { |
1030 return [attributeToMethodNameMap objectForKey:attribute]; | 1030 return [attributeToMethodNameMap objectForKey:attribute]; |
1031 } | 1031 } |
1032 | 1032 |
| 1033 - (void)swapChildren:(base::scoped_nsobject<NSMutableArray>*)other { |
| 1034 children_.swap(*other); |
| 1035 } |
| 1036 |
1033 // Returns the accessibility value for the given attribute. If the value isn't | 1037 // Returns the accessibility value for the given attribute. If the value isn't |
1034 // supported this will return nil. | 1038 // supported this will return nil. |
1035 - (id)accessibilityAttributeValue:(NSString*)attribute { | 1039 - (id)accessibilityAttributeValue:(NSString*)attribute { |
1036 if (!browserAccessibility_) | 1040 if (!browserAccessibility_) |
1037 return nil; | 1041 return nil; |
1038 | 1042 |
1039 SEL selector = | 1043 SEL selector = |
1040 NSSelectorFromString([self methodNameForAttribute:attribute]); | 1044 NSSelectorFromString([self methodNameForAttribute:attribute]); |
1041 if (selector) | 1045 if (selector) |
1042 return [self performSelector:selector]; | 1046 return [self performSelector:selector]; |
(...skipping 524 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1567 return [super hash]; | 1571 return [super hash]; |
1568 return browserAccessibility_->GetId(); | 1572 return browserAccessibility_->GetId(); |
1569 } | 1573 } |
1570 | 1574 |
1571 - (BOOL)accessibilityShouldUseUniqueId { | 1575 - (BOOL)accessibilityShouldUseUniqueId { |
1572 return YES; | 1576 return YES; |
1573 } | 1577 } |
1574 | 1578 |
1575 @end | 1579 @end |
1576 | 1580 |
OLD | NEW |