OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #ifndef UI_ACCESSIBILITY_PLATFORM_AX_PLATFORM_NODE_BASE_H_ | 5 #ifndef UI_ACCESSIBILITY_PLATFORM_AX_PLATFORM_NODE_BASE_H_ |
6 #define UI_ACCESSIBILITY_PLATFORM_AX_PLATFORM_NODE_BASE_H_ | 6 #define UI_ACCESSIBILITY_PLATFORM_AX_PLATFORM_NODE_BASE_H_ |
7 | 7 |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "ui/accessibility/ax_enums.h" | 9 #include "ui/accessibility/ax_enums.h" |
10 #include "ui/accessibility/platform/ax_platform_node.h" | 10 #include "ui/accessibility/platform/ax_platform_node.h" |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
123 protected: | 123 protected: |
124 AXPlatformNodeBase(); | 124 AXPlatformNodeBase(); |
125 ~AXPlatformNodeBase() override; | 125 ~AXPlatformNodeBase() override; |
126 | 126 |
127 bool IsTextOnlyObject() const; | 127 bool IsTextOnlyObject() const; |
128 bool IsNativeTextControl() const; | 128 bool IsNativeTextControl() const; |
129 bool IsSimpleTextControl() const; | 129 bool IsSimpleTextControl() const; |
130 bool IsRichTextControl(); | 130 bool IsRichTextControl(); |
131 bool IsRangeValueSupported() const; | 131 bool IsRangeValueSupported() const; |
132 | 132 |
| 133 // Get the range value text, which might come from aria-valuetext or |
| 134 // a floating-point value. This is different from the value string |
| 135 // attribute used in input controls such as text boxes and combo boxes. |
| 136 base::string16 GetRangeValueText(); |
| 137 |
133 // |GetInnerText| recursively includes all the text from descendants such as | 138 // |GetInnerText| recursively includes all the text from descendants such as |
134 // text found in any embedded object. | 139 // text found in any embedded object. |
135 base::string16 GetInnerText(); | 140 base::string16 GetInnerText(); |
136 | 141 |
137 // Cast a gfx::NativeViewAccessible to an AXPlatformNodeBase if it is one, | 142 // Cast a gfx::NativeViewAccessible to an AXPlatformNodeBase if it is one, |
138 // or return NULL if it's not an instance of this class. | 143 // or return NULL if it's not an instance of this class. |
139 static AXPlatformNodeBase* FromNativeViewAccessible( | 144 static AXPlatformNodeBase* FromNativeViewAccessible( |
140 gfx::NativeViewAccessible accessible); | 145 gfx::NativeViewAccessible accessible); |
141 | 146 |
142 virtual void Dispose(); | 147 virtual void Dispose(); |
143 | 148 |
144 // Sets the text selection in this object if possible. | 149 // Sets the text selection in this object if possible. |
145 bool SetTextSelection(int start_offset, int end_offset); | 150 bool SetTextSelection(int start_offset, int end_offset); |
146 | 151 |
147 private: | 152 private: |
148 DISALLOW_COPY_AND_ASSIGN(AXPlatformNodeBase); | 153 DISALLOW_COPY_AND_ASSIGN(AXPlatformNodeBase); |
149 }; | 154 }; |
150 | 155 |
151 } // namespace ui | 156 } // namespace ui |
152 | 157 |
153 #endif // UI_ACCESSIBILITY_PLATFORM_AX_PLATFORM_NODE_BASE_H_ | 158 #endif // UI_ACCESSIBILITY_PLATFORM_AX_PLATFORM_NODE_BASE_H_ |
OLD | NEW |