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 363 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
374 | 374 |
375 - (NSString*)ariaRelevant { | 375 - (NSString*)ariaRelevant { |
376 return NSStringForStringAttribute( | 376 return NSStringForStringAttribute( |
377 browserAccessibility_->string_attributes(), | 377 browserAccessibility_->string_attributes(), |
378 AccessibilityNodeData::ATTR_LIVE_RELEVANT); | 378 AccessibilityNodeData::ATTR_LIVE_RELEVANT); |
379 } | 379 } |
380 | 380 |
381 // Returns an array of BrowserAccessibilityCocoa objects, representing the | 381 // Returns an array of BrowserAccessibilityCocoa objects, representing the |
382 // accessibility children of this object. | 382 // accessibility children of this object. |
383 - (NSArray*)children { | 383 - (NSArray*)children { |
384 if (!children_.get()) { | 384 if (!children_) { |
385 children_.reset([[NSMutableArray alloc] | 385 children_.reset([[NSMutableArray alloc] |
386 initWithCapacity:browserAccessibility_->child_count()] ); | 386 initWithCapacity:browserAccessibility_->child_count()] ); |
387 for (uint32 index = 0; | 387 for (uint32 index = 0; |
388 index < browserAccessibility_->child_count(); | 388 index < browserAccessibility_->child_count(); |
389 ++index) { | 389 ++index) { |
390 BrowserAccessibilityCocoa* child = | 390 BrowserAccessibilityCocoa* child = |
391 browserAccessibility_->GetChild(index)->ToBrowserAccessibilityCocoa(); | 391 browserAccessibility_->GetChild(index)->ToBrowserAccessibilityCocoa(); |
392 if ([child isIgnored]) | 392 if ([child isIgnored]) |
393 [children_ addObjectsFromArray:[child children]]; | 393 [children_ addObjectsFromArray:[child children]]; |
394 else | 394 else |
(...skipping 823 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1218 return [super hash]; | 1218 return [super hash]; |
1219 return browserAccessibility_->renderer_id(); | 1219 return browserAccessibility_->renderer_id(); |
1220 } | 1220 } |
1221 | 1221 |
1222 - (BOOL)accessibilityShouldUseUniqueId { | 1222 - (BOOL)accessibilityShouldUseUniqueId { |
1223 return YES; | 1223 return YES; |
1224 } | 1224 } |
1225 | 1225 |
1226 @end | 1226 @end |
1227 | 1227 |
OLD | NEW |