| 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 #import "content/browser/accessibility/browser_accessibility_cocoa.h" | 5 #import "content/browser/accessibility/browser_accessibility_cocoa.h" |
| 6 | 6 |
| 7 #include <execinfo.h> | 7 #include <execinfo.h> |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 #include <string.h> | 10 #include <string.h> |
| (...skipping 902 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 913 } | 913 } |
| 914 | 914 |
| 915 - (NSNumber*)enabled { | 915 - (NSNumber*)enabled { |
| 916 if (![self instanceActive]) | 916 if (![self instanceActive]) |
| 917 return nil; | 917 return nil; |
| 918 return [NSNumber numberWithBool: | 918 return [NSNumber numberWithBool: |
| 919 !GetState(browserAccessibility_, ui::AX_STATE_DISABLED)]; | 919 !GetState(browserAccessibility_, ui::AX_STATE_DISABLED)]; |
| 920 } | 920 } |
| 921 | 921 |
| 922 - (id)startTextMarker { | 922 - (id)startTextMarker { |
| 923 return [[self textMarkerHelper] startTextMarker]; | 923 return [[self textMarkerHelper] AXStartTextMarker]; |
| 924 } | 924 } |
| 925 | 925 |
| 926 - (id)endTextMarker { | 926 - (id)endTextMarker { |
| 927 return [[self textMarkerHelper] endTextMarker]; | 927 return [[self textMarkerHelper] AXEndTextMarker]; |
| 928 } | 928 } |
| 929 | 929 |
| 930 - (NSNumber*)expanded { | 930 - (NSNumber*)expanded { |
| 931 if (![self instanceActive]) | 931 if (![self instanceActive]) |
| 932 return nil; | 932 return nil; |
| 933 return [NSNumber numberWithBool: | 933 return [NSNumber numberWithBool: |
| 934 GetState(browserAccessibility_, ui::AX_STATE_EXPANDED)]; | 934 GetState(browserAccessibility_, ui::AX_STATE_EXPANDED)]; |
| 935 } | 935 } |
| 936 | 936 |
| 937 - (NSNumber*)focused { | 937 - (NSNumber*)focused { |
| (...skipping 673 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1611 } | 1611 } |
| 1612 | 1612 |
| 1613 if (selStart > selEnd) | 1613 if (selStart > selEnd) |
| 1614 std::swap(selStart, selEnd); | 1614 std::swap(selStart, selEnd); |
| 1615 | 1615 |
| 1616 int selLength = selEnd - selStart; | 1616 int selLength = selEnd - selStart; |
| 1617 return [NSValue valueWithRange:NSMakeRange(selStart, selLength)]; | 1617 return [NSValue valueWithRange:NSMakeRange(selStart, selLength)]; |
| 1618 } | 1618 } |
| 1619 | 1619 |
| 1620 - (id)selectedTextMarkerRange { | 1620 - (id)selectedTextMarkerRange { |
| 1621 return [[self textMarkerHelper] selectedTextMarkerRange]; | 1621 return [[self textMarkerHelper] AXSelectedTextMarkerRange]; |
| 1622 } | 1622 } |
| 1623 | 1623 |
| 1624 - (NSValue*)size { | 1624 - (NSValue*)size { |
| 1625 if (![self instanceActive]) | 1625 if (![self instanceActive]) |
| 1626 return nil; | 1626 return nil; |
| 1627 gfx::Rect bounds = browserAccessibility_->GetPageBoundsRect(); | 1627 gfx::Rect bounds = browserAccessibility_->GetPageBoundsRect(); |
| 1628 return [NSValue valueWithSize:NSMakeSize(bounds.width(), bounds.height())]; | 1628 return [NSValue valueWithSize:NSMakeSize(bounds.width(), bounds.height())]; |
| 1629 } | 1629 } |
| 1630 | 1630 |
| 1631 - (NSString*)sortDirection { | 1631 - (NSString*)sortDirection { |
| (...skipping 1043 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2675 | 2675 |
| 2676 id BrowserPositionFactory::GetAccessibilityObject( | 2676 id BrowserPositionFactory::GetAccessibilityObject( |
| 2677 const ui::AXPositionData& data) const { | 2677 const ui::AXPositionData& data) const { |
| 2678 AXPlatformPositionInstance position = | 2678 AXPlatformPositionInstance position = |
| 2679 AXPlatformPosition::CreateFromData(data); | 2679 AXPlatformPosition::CreateFromData(data); |
| 2680 if (!position->IsNullPosition()) | 2680 if (!position->IsNullPosition()) |
| 2681 return ToBrowserAccessibilityCocoa(position->GetAnchor()); | 2681 return ToBrowserAccessibilityCocoa(position->GetAnchor()); |
| 2682 | 2682 |
| 2683 return nil; | 2683 return nil; |
| 2684 } | 2684 } |
| OLD | NEW |