OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_MANAGER_ANDROID_H_ | 5 #ifndef CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_MANAGER_ANDROID_H_ |
6 #define CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_MANAGER_ANDROID_H_ | 6 #define CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_MANAGER_ANDROID_H_ |
7 | 7 |
| 8 #include <stdint.h> |
| 9 |
8 #include "base/android/scoped_java_ref.h" | 10 #include "base/android/scoped_java_ref.h" |
| 11 #include "base/macros.h" |
9 #include "content/browser/accessibility/browser_accessibility_manager.h" | 12 #include "content/browser/accessibility/browser_accessibility_manager.h" |
10 #include "content/browser/android/content_view_core_impl.h" | 13 #include "content/browser/android/content_view_core_impl.h" |
11 | 14 |
12 namespace content { | 15 namespace content { |
13 | 16 |
14 namespace aria_strings { | 17 namespace aria_strings { |
15 extern const char kAriaLivePolite[]; | 18 extern const char kAriaLivePolite[]; |
16 extern const char kAriaLiveAssertive[]; | 19 extern const char kAriaLiveAssertive[]; |
17 } | 20 } |
18 | 21 |
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
171 jboolean extend_selection, | 174 jboolean extend_selection, |
172 jint id, | 175 jint id, |
173 jint cursor_index); | 176 jint cursor_index); |
174 | 177 |
175 // Helper functions to compute the next start and end index when moving | 178 // Helper functions to compute the next start and end index when moving |
176 // forwards or backwards by character, word, or line. This part is | 179 // forwards or backwards by character, word, or line. This part is |
177 // unit-tested; the Java interfaces above are just wrappers. Both of these | 180 // unit-tested; the Java interfaces above are just wrappers. Both of these |
178 // take a single cursor index as input and return the boundaries surrounding | 181 // take a single cursor index as input and return the boundaries surrounding |
179 // the next word or line. If moving by character, the output start and | 182 // the next word or line. If moving by character, the output start and |
180 // end index will be the same. | 183 // end index will be the same. |
181 bool NextAtGranularity( | 184 bool NextAtGranularity(int32_t granularity, |
182 int32 granularity, int cursor_index, | 185 int cursor_index, |
183 BrowserAccessibilityAndroid* node, int32* start_index, int32* end_index); | 186 BrowserAccessibilityAndroid* node, |
184 bool PreviousAtGranularity( | 187 int32_t* start_index, |
185 int32 granularity, int cursor_index, | 188 int32_t* end_index); |
186 BrowserAccessibilityAndroid* node, int32* start_index, int32* end_index); | 189 bool PreviousAtGranularity(int32_t granularity, |
| 190 int cursor_index, |
| 191 BrowserAccessibilityAndroid* node, |
| 192 int32_t* start_index, |
| 193 int32_t* end_index); |
187 | 194 |
188 // Set accessibility focus. This sends a message to the renderer to | 195 // Set accessibility focus. This sends a message to the renderer to |
189 // asynchronously load inline text boxes for this node only, enabling more | 196 // asynchronously load inline text boxes for this node only, enabling more |
190 // accurate movement by granularities on this node. | 197 // accurate movement by granularities on this node. |
191 void SetAccessibilityFocus(JNIEnv* env, | 198 void SetAccessibilityFocus(JNIEnv* env, |
192 const base::android::JavaParamRef<jobject>& obj, | 199 const base::android::JavaParamRef<jobject>& obj, |
193 jint id); | 200 jint id); |
194 | 201 |
195 // Returns true if the object is a slider. | 202 // Returns true if the object is a slider. |
196 bool IsSlider(JNIEnv* env, | 203 bool IsSlider(JNIEnv* env, |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
232 bool prune_tree_for_screen_reader_; | 239 bool prune_tree_for_screen_reader_; |
233 | 240 |
234 DISALLOW_COPY_AND_ASSIGN(BrowserAccessibilityManagerAndroid); | 241 DISALLOW_COPY_AND_ASSIGN(BrowserAccessibilityManagerAndroid); |
235 }; | 242 }; |
236 | 243 |
237 bool RegisterBrowserAccessibilityManager(JNIEnv* env); | 244 bool RegisterBrowserAccessibilityManager(JNIEnv* env); |
238 | 245 |
239 } | 246 } |
240 | 247 |
241 #endif // CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_MANAGER_ANDROID_H
_ | 248 #endif // CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_MANAGER_ANDROID_H
_ |
OLD | NEW |