| 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 #include <execinfo.h> | 5 #include <execinfo.h> |
| 6 #include <stddef.h> | 6 #include <stddef.h> |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #import "content/browser/accessibility/browser_accessibility_cocoa.h" | 9 #import "content/browser/accessibility/browser_accessibility_cocoa.h" |
| 10 | 10 |
| (...skipping 2780 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2791 if (![self instanceActive]) | 2791 if (![self instanceActive]) |
| 2792 return; | 2792 return; |
| 2793 | 2793 |
| 2794 // TODO(dmazzoni): Support more actions. | 2794 // TODO(dmazzoni): Support more actions. |
| 2795 if ([action isEqualToString:NSAccessibilityPressAction]) { | 2795 if ([action isEqualToString:NSAccessibilityPressAction]) { |
| 2796 [self delegate]->AccessibilityDoDefaultAction( | 2796 [self delegate]->AccessibilityDoDefaultAction( |
| 2797 browserAccessibility_->GetId()); | 2797 browserAccessibility_->GetId()); |
| 2798 } else if ([action isEqualToString:NSAccessibilityShowMenuAction]) { | 2798 } else if ([action isEqualToString:NSAccessibilityShowMenuAction]) { |
| 2799 [self delegate]->AccessibilityShowContextMenu( | 2799 [self delegate]->AccessibilityShowContextMenu( |
| 2800 browserAccessibility_->GetId()); | 2800 browserAccessibility_->GetId()); |
| 2801 } else if ([action isEqualToString:NSAccessibilityScrollToVisibleAction]) { |
| 2802 browserAccessibility_->manager()->ScrollToMakeVisible( |
| 2803 *browserAccessibility_, gfx::Rect()); |
| 2801 } | 2804 } |
| 2802 } | 2805 } |
| 2803 | 2806 |
| 2804 // Returns the description of the given action. | 2807 // Returns the description of the given action. |
| 2805 - (NSString*)accessibilityActionDescription:(NSString*)action { | 2808 - (NSString*)accessibilityActionDescription:(NSString*)action { |
| 2806 if (![self instanceActive]) | 2809 if (![self instanceActive]) |
| 2807 return nil; | 2810 return nil; |
| 2808 | 2811 |
| 2809 return NSAccessibilityActionDescription(action); | 2812 return NSAccessibilityActionDescription(action); |
| 2810 } | 2813 } |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2878 if (![self instanceActive]) | 2881 if (![self instanceActive]) |
| 2879 return [super hash]; | 2882 return [super hash]; |
| 2880 return browserAccessibility_->GetId(); | 2883 return browserAccessibility_->GetId(); |
| 2881 } | 2884 } |
| 2882 | 2885 |
| 2883 - (BOOL)accessibilityShouldUseUniqueId { | 2886 - (BOOL)accessibilityShouldUseUniqueId { |
| 2884 return YES; | 2887 return YES; |
| 2885 } | 2888 } |
| 2886 | 2889 |
| 2887 @end | 2890 @end |
| OLD | NEW |