Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 239 | 239 |
| 240 - (id)initWithObject:(BrowserAccessibility*)accessibility | 240 - (id)initWithObject:(BrowserAccessibility*)accessibility |
| 241 delegate:(id<BrowserAccessibilityDelegateCocoa>)delegate { | 241 delegate:(id<BrowserAccessibilityDelegateCocoa>)delegate { |
| 242 if ((self = [super init])) { | 242 if ((self = [super init])) { |
| 243 browserAccessibility_ = accessibility; | 243 browserAccessibility_ = accessibility; |
| 244 delegate_ = delegate; | 244 delegate_ = delegate; |
| 245 } | 245 } |
| 246 return self; | 246 return self; |
| 247 } | 247 } |
| 248 | 248 |
| 249 extern "C" void NSAccessibilityUnregisterUniqueIdForUIElement(id element); | |
|
dmazzoni
2011/08/02 06:19:35
Is this not in any include files?
Does it maybe b
David Tseng
2011/08/02 21:30:57
I couldn't find it in any header files. I'm guessi
| |
| 249 // Deletes our associated BrowserAccessibilityMac. | 250 // Deletes our associated BrowserAccessibilityMac. |
| 250 - (void)dealloc { | 251 - (void)dealloc { |
| 251 if (browserAccessibility_) { | 252 if (browserAccessibility_) { |
| 253 NSAccessibilityUnregisterUniqueIdForUIElement(self); | |
| 252 delete browserAccessibility_; | 254 delete browserAccessibility_; |
| 253 browserAccessibility_ = NULL; | 255 browserAccessibility_ = NULL; |
| 254 } | 256 } |
| 255 | 257 |
| 256 [super dealloc]; | 258 [super dealloc]; |
| 257 } | 259 } |
| 258 | 260 |
| 259 // Returns an array of BrowserAccessibilityCocoa objects, representing the | 261 // Returns an array of BrowserAccessibilityCocoa objects, representing the |
| 260 // accessibility children of this object. | 262 // accessibility children of this object. |
| 261 - (NSArray*)children { | 263 - (NSArray*)children { |
| (...skipping 563 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 825 return ([self hash] == [object hash]); | 827 return ([self hash] == [object hash]); |
| 826 } | 828 } |
| 827 | 829 |
| 828 - (NSUInteger)hash { | 830 - (NSUInteger)hash { |
| 829 // Potentially called during dealloc. | 831 // Potentially called during dealloc. |
| 830 if (!browserAccessibility_) | 832 if (!browserAccessibility_) |
| 831 return [super hash]; | 833 return [super hash]; |
| 832 return browserAccessibility_->renderer_id(); | 834 return browserAccessibility_->renderer_id(); |
| 833 } | 835 } |
| 834 | 836 |
| 837 - (BOOL)accessibilityShouldUseUniqueId { | |
| 838 return YES; | |
| 839 } | |
| 840 | |
| 835 @end | 841 @end |
| 836 | 842 |
| OLD | NEW |