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 #include "content/browser/accessibility/browser_accessibility_manager_android.h" | 5 #include "content/browser/accessibility/browser_accessibility_manager_android.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <cmath> | 9 #include <cmath> |
10 | 10 |
(...skipping 477 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
488 node->IsFocused(), | 488 node->IsFocused(), |
489 node->IsCollapsed(), | 489 node->IsCollapsed(), |
490 node->IsExpanded(), | 490 node->IsExpanded(), |
491 node->HasNonEmptyValue()); | 491 node->HasNonEmptyValue()); |
492 Java_BrowserAccessibilityManager_setAccessibilityNodeInfoClassName( | 492 Java_BrowserAccessibilityManager_setAccessibilityNodeInfoClassName( |
493 env, obj, info, | 493 env, obj, info, |
494 base::android::ConvertUTF8ToJavaString(env, node->GetClassName())); | 494 base::android::ConvertUTF8ToJavaString(env, node->GetClassName())); |
495 Java_BrowserAccessibilityManager_setAccessibilityNodeInfoText( | 495 Java_BrowserAccessibilityManager_setAccessibilityNodeInfoText( |
496 env, obj, info, | 496 env, obj, info, |
497 base::android::ConvertUTF16ToJavaString(env, node->GetText()), | 497 base::android::ConvertUTF16ToJavaString(env, node->GetText()), |
498 node->IsLink(), node->IsEditableText()); | 498 node->IsLink(), node->IsEditableText(), |
| 499 base::android::ConvertUTF16ToJavaString( |
| 500 env, node->GetInheritedString16Attribute(ui::AX_ATTR_LANGUAGE))); |
499 base::string16 element_id; | 501 base::string16 element_id; |
500 if (node->GetHtmlAttribute("id", &element_id)) { | 502 if (node->GetHtmlAttribute("id", &element_id)) { |
501 Java_BrowserAccessibilityManager_setAccessibilityNodeInfoViewIdResourceName( | 503 Java_BrowserAccessibilityManager_setAccessibilityNodeInfoViewIdResourceName( |
502 env, obj, info, | 504 env, obj, info, |
503 base::android::ConvertUTF16ToJavaString(env, element_id)); | 505 base::android::ConvertUTF16ToJavaString(env, element_id)); |
504 } | 506 } |
505 | 507 |
506 gfx::Rect absolute_rect = node->GetPageBoundsRect(); | 508 gfx::Rect absolute_rect = node->GetPageBoundsRect(); |
507 gfx::Rect parent_relative_rect = absolute_rect; | 509 gfx::Rect parent_relative_rect = absolute_rect; |
508 if (node->PlatformGetParent()) { | 510 if (node->PlatformGetParent()) { |
(...skipping 594 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1103 | 1105 |
1104 JNIEnv* env = AttachCurrentThread(); | 1106 JNIEnv* env = AttachCurrentThread(); |
1105 return root_manager->java_ref().get(env); | 1107 return root_manager->java_ref().get(env); |
1106 } | 1108 } |
1107 | 1109 |
1108 bool RegisterBrowserAccessibilityManager(JNIEnv* env) { | 1110 bool RegisterBrowserAccessibilityManager(JNIEnv* env) { |
1109 return RegisterNativesImpl(env); | 1111 return RegisterNativesImpl(env); |
1110 } | 1112 } |
1111 | 1113 |
1112 } // namespace content | 1114 } // namespace content |
OLD | NEW |