Chromium Code Reviews| Index: content/browser/accessibility/browser_accessibility_cocoa.mm |
| diff --git a/content/browser/accessibility/browser_accessibility_cocoa.mm b/content/browser/accessibility/browser_accessibility_cocoa.mm |
| index a0a8338f3f294ec228f5613173c49785afc1e264..dc93c6310dd0cebf2d1b78c3efacce2ab1b7eba9 100644 |
| --- a/content/browser/accessibility/browser_accessibility_cocoa.mm |
| +++ b/content/browser/accessibility/browser_accessibility_cocoa.mm |
| @@ -106,11 +106,6 @@ const int kAXResultsLimitNoLimit = -1; |
| extern "C" { |
| -// See http://openradar.appspot.com/9896491. This SPI has been tested on 10.5, |
| -// 10.6, and 10.7. It allows accessibility clients to observe events posted on |
| -// this object. |
| -void NSAccessibilityUnregisterUniqueIdForUIElement(id element); |
| - |
| // The following are private accessibility APIs required for cursor navigation |
| // and text selection. VoiceOver started relying on them in Mac OS X 10.11. |
| #if !defined(MAC_OS_X_VERSION_10_11) || \ |
| @@ -610,8 +605,10 @@ NSString* const NSAccessibilityRequiredAttribute = @"AXRequired"; |
| } |
| - (void)detach { |
| - if (browserAccessibility_) |
| - NSAccessibilityUnregisterUniqueIdForUIElement(self); |
| + if (!browserAccessibility_) |
| + return; |
| + NSAccessibilityPostNotification( |
| + self, NSAccessibilityUIElementDestroyedNotification); |
| browserAccessibility_ = nullptr; |
| } |
| @@ -2880,7 +2877,10 @@ NSString* const NSAccessibilityRequiredAttribute = @"AXRequired"; |
| return browserAccessibility_->GetId(); |
| } |
| -- (BOOL)accessibilityShouldUseUniqueId { |
| +- (BOOL)accessibilityNotifiesWhenDestroyed { |
| + // Indicate that BrowserAccessibilityCocoa will post a notification when it's |
| + // destroyed (see - detach). This allows VoiceOver to do some internal |
|
tapted
2016/10/04 08:17:39
nit: -detach (no space)
Patti Lor
2016/10/05 05:47:23
Done.
|
| + // things more efficiently. |
| return YES; |
| } |