Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(315)

Side by Side Diff: content/browser/accessibility/browser_accessibility_cocoa.mm

Issue 272573003: Add hack so VoiceOver speaks updates to injected live regions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Only recreate if it already exists Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « content/browser/accessibility/browser_accessibility_cocoa.h ('k') | content/browser/accessibility/browser_accessibility_mac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698