| 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 2777 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2788 | 2788 |
| 2789 // TODO(dmazzoni): Support more actions. | 2789 // TODO(dmazzoni): Support more actions. |
| 2790 BrowserAccessibilityManager* manager = browserAccessibility_->manager(); | 2790 BrowserAccessibilityManager* manager = browserAccessibility_->manager(); |
| 2791 if ([action isEqualToString:NSAccessibilityPressAction]) { | 2791 if ([action isEqualToString:NSAccessibilityPressAction]) { |
| 2792 manager->DoDefaultAction(*browserAccessibility_); | 2792 manager->DoDefaultAction(*browserAccessibility_); |
| 2793 } else if ([action isEqualToString:NSAccessibilityShowMenuAction]) { | 2793 } else if ([action isEqualToString:NSAccessibilityShowMenuAction]) { |
| 2794 manager->ShowContextMenu(*browserAccessibility_); | 2794 manager->ShowContextMenu(*browserAccessibility_); |
| 2795 } else if ([action isEqualToString:NSAccessibilityScrollToVisibleAction]) { | 2795 } else if ([action isEqualToString:NSAccessibilityScrollToVisibleAction]) { |
| 2796 manager->ScrollToMakeVisible( | 2796 manager->ScrollToMakeVisible( |
| 2797 *browserAccessibility_, gfx::Rect()); | 2797 *browserAccessibility_, gfx::Rect()); |
| 2798 } else if ([action isEqualToString:NSAccessibilityIncrementAction]) { |
| 2799 manager->Increment(*browserAccessibility_); |
| 2800 } else if ([action isEqualToString:NSAccessibilityDecrementAction]) { |
| 2801 manager->Decrement(*browserAccessibility_); |
| 2798 } | 2802 } |
| 2799 } | 2803 } |
| 2800 | 2804 |
| 2801 // Returns the description of the given action. | 2805 // Returns the description of the given action. |
| 2802 - (NSString*)accessibilityActionDescription:(NSString*)action { | 2806 - (NSString*)accessibilityActionDescription:(NSString*)action { |
| 2803 if (![self instanceActive]) | 2807 if (![self instanceActive]) |
| 2804 return nil; | 2808 return nil; |
| 2805 | 2809 |
| 2806 return NSAccessibilityActionDescription(action); | 2810 return NSAccessibilityActionDescription(action); |
| 2807 } | 2811 } |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2868 } | 2872 } |
| 2869 | 2873 |
| 2870 - (BOOL)accessibilityNotifiesWhenDestroyed { | 2874 - (BOOL)accessibilityNotifiesWhenDestroyed { |
| 2871 // Indicate that BrowserAccessibilityCocoa will post a notification when it's | 2875 // Indicate that BrowserAccessibilityCocoa will post a notification when it's |
| 2872 // destroyed (see -detach). This allows VoiceOver to do some internal things | 2876 // destroyed (see -detach). This allows VoiceOver to do some internal things |
| 2873 // more efficiently. | 2877 // more efficiently. |
| 2874 return YES; | 2878 return YES; |
| 2875 } | 2879 } |
| 2876 | 2880 |
| 2877 @end | 2881 @end |
| OLD | NEW |