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 409 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
420 | 420 |
421 return @""; | 421 return @""; |
422 } | 422 } |
423 | 423 |
424 - (NSNumber*)enabled { | 424 - (NSNumber*)enabled { |
425 return [NSNumber numberWithBool: | 425 return [NSNumber numberWithBool: |
426 !GetState(browserAccessibility_, WebAccessibility::STATE_UNAVAILABLE)]; | 426 !GetState(browserAccessibility_, WebAccessibility::STATE_UNAVAILABLE)]; |
427 } | 427 } |
428 | 428 |
429 - (NSNumber*)focused { | 429 - (NSNumber*)focused { |
430 BrowserAccessibilityManager* manager = browserAccessibility_->manager(); | |
430 NSNumber* ret = [NSNumber numberWithBool: | 431 NSNumber* ret = [NSNumber numberWithBool: |
431 GetState(browserAccessibility_, WebAccessibility::STATE_FOCUSED)]; | 432 manager->GetFocus(NULL) == browserAccessibility_]; |
David Tseng
2011/11/30 20:49:33
question: do we ever care that the previously focu
dmazzoni
2011/11/30 22:02:27
This change means that we're basically ignoring wh
| |
432 return ret; | 433 return ret; |
433 } | 434 } |
434 | 435 |
435 - (NSString*)help { | 436 - (NSString*)help { |
436 return NSStringForStringAttribute( | 437 return NSStringForStringAttribute( |
437 browserAccessibility_->string_attributes(), | 438 browserAccessibility_->string_attributes(), |
438 WebAccessibility::ATTR_HELP); | 439 WebAccessibility::ATTR_HELP); |
439 } | 440 } |
440 | 441 |
441 // Returns whether or not this node should be ignored in the | 442 // Returns whether or not this node should be ignored in the |
(...skipping 593 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1035 return [super hash]; | 1036 return [super hash]; |
1036 return browserAccessibility_->renderer_id(); | 1037 return browserAccessibility_->renderer_id(); |
1037 } | 1038 } |
1038 | 1039 |
1039 - (BOOL)accessibilityShouldUseUniqueId { | 1040 - (BOOL)accessibilityShouldUseUniqueId { |
1040 return YES; | 1041 return YES; |
1041 } | 1042 } |
1042 | 1043 |
1043 @end | 1044 @end |
1044 | 1045 |
OLD | NEW |