| 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 |
| 11 #include <map> | 11 #include <map> |
| 12 | 12 |
| 13 #include "base/mac/foundation_util.h" | 13 #include "base/mac/foundation_util.h" |
| 14 #include "base/mac/scoped_cftyperef.h" | 14 #include "base/mac/scoped_cftyperef.h" |
| 15 #import "base/mac/sdk_forward_declarations.h" |
| 15 #include "base/strings/string16.h" | 16 #include "base/strings/string16.h" |
| 16 #include "base/strings/sys_string_conversions.h" | 17 #include "base/strings/sys_string_conversions.h" |
| 17 #include "base/strings/utf_string_conversions.h" | 18 #include "base/strings/utf_string_conversions.h" |
| 18 #include "content/app/strings/grit/content_strings.h" | 19 #include "content/app/strings/grit/content_strings.h" |
| 19 #include "content/browser/accessibility/browser_accessibility_mac.h" | 20 #include "content/browser/accessibility/browser_accessibility_mac.h" |
| 20 #include "content/browser/accessibility/browser_accessibility_manager.h" | 21 #include "content/browser/accessibility/browser_accessibility_manager.h" |
| 21 #include "content/browser/accessibility/browser_accessibility_manager_mac.h" | 22 #include "content/browser/accessibility/browser_accessibility_manager_mac.h" |
| 22 #include "content/browser/accessibility/one_shot_accessibility_tree_search.h" | 23 #include "content/browser/accessibility/one_shot_accessibility_tree_search.h" |
| 23 #include "content/public/common/content_client.h" | 24 #include "content/public/common/content_client.h" |
| 24 #include "third_party/skia/include/core/SkColor.h" | 25 #include "third_party/skia/include/core/SkColor.h" |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 int32_t node_id; | 95 int32_t node_id; |
| 95 int offset; | 96 int offset; |
| 96 ui::AXTextAffinity affinity; | 97 ui::AXTextAffinity affinity; |
| 97 }; | 98 }; |
| 98 | 99 |
| 99 // VoiceOver uses -1 to mean "no limit" for AXResultsLimit. | 100 // VoiceOver uses -1 to mean "no limit" for AXResultsLimit. |
| 100 const int kAXResultsLimitNoLimit = -1; | 101 const int kAXResultsLimitNoLimit = -1; |
| 101 | 102 |
| 102 extern "C" { | 103 extern "C" { |
| 103 | 104 |
| 104 // See http://openradar.appspot.com/9896491. This SPI has been tested on 10.5, | |
| 105 // 10.6, and 10.7. It allows accessibility clients to observe events posted on | |
| 106 // this object. | |
| 107 void NSAccessibilityUnregisterUniqueIdForUIElement(id element); | |
| 108 | |
| 109 // The following are private accessibility APIs required for cursor navigation | 105 // The following are private accessibility APIs required for cursor navigation |
| 110 // and text selection. VoiceOver started relying on them in Mac OS X 10.11. | 106 // and text selection. VoiceOver started relying on them in Mac OS X 10.11. |
| 111 #if !defined(MAC_OS_X_VERSION_10_11) || \ | 107 #if !defined(MAC_OS_X_VERSION_10_11) || \ |
| 112 MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_11 | 108 MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_11 |
| 113 | 109 |
| 114 AXTextMarkerRef AXTextMarkerCreate(CFAllocatorRef allocator, | 110 AXTextMarkerRef AXTextMarkerCreate(CFAllocatorRef allocator, |
| 115 const UInt8* bytes, | 111 const UInt8* bytes, |
| 116 CFIndex length); | 112 CFIndex length); |
| 117 | 113 |
| 118 const UInt8* AXTextMarkerGetBytePtr(AXTextMarkerRef text_marker); | 114 const UInt8* AXTextMarkerGetBytePtr(AXTextMarkerRef text_marker); |
| (...skipping 2637 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2756 if (![self instanceActive]) | 2752 if (![self instanceActive]) |
| 2757 return [super hash]; | 2753 return [super hash]; |
| 2758 return browserAccessibility_->GetId(); | 2754 return browserAccessibility_->GetId(); |
| 2759 } | 2755 } |
| 2760 | 2756 |
| 2761 - (BOOL)accessibilityShouldUseUniqueId { | 2757 - (BOOL)accessibilityShouldUseUniqueId { |
| 2762 return YES; | 2758 return YES; |
| 2763 } | 2759 } |
| 2764 | 2760 |
| 2765 @end | 2761 @end |
| OLD | NEW |