Chromium Code Reviews| 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 385 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 396 node->CanScrollLeft(), | 396 node->CanScrollLeft(), |
| 397 node->CanScrollRight(), | 397 node->CanScrollRight(), |
| 398 node->IsClickable(), | 398 node->IsClickable(), |
| 399 node->IsEditableText(), | 399 node->IsEditableText(), |
| 400 node->IsEnabled(), | 400 node->IsEnabled(), |
| 401 node->IsFocusable(), | 401 node->IsFocusable(), |
| 402 node->IsFocused()); | 402 node->IsFocused()); |
| 403 Java_BrowserAccessibilityManager_setAccessibilityNodeInfoClassName( | 403 Java_BrowserAccessibilityManager_setAccessibilityNodeInfoClassName( |
| 404 env, obj, info, | 404 env, obj, info, |
| 405 base::android::ConvertUTF8ToJavaString(env, node->GetClassName()).obj()); | 405 base::android::ConvertUTF8ToJavaString(env, node->GetClassName()).obj()); |
| 406 if (!node->IsPassword() || | 406 if (!node->IsPassword() || |
|
David Tseng
2016/04/11 16:48:34
How do we currently work with input type password?
dmazzoni
2016/04/11 20:49:06
There's an Android setting that determines whether
David Tseng
2016/04/11 21:01:41
I thought it wasn't so much that it was echoed, bu
| |
| 407 Java_BrowserAccessibilityManager_shouldExposePasswordText(env, obj)) { | 407 Java_BrowserAccessibilityManager_shouldExposePasswordText(env, obj)) { |
| 408 Java_BrowserAccessibilityManager_setAccessibilityNodeInfoContentDescription( | 408 Java_BrowserAccessibilityManager_setAccessibilityNodeInfoText( |
| 409 env, obj, info, | 409 env, obj, info, |
| 410 base::android::ConvertUTF16ToJavaString(env, node->GetText()).obj(), | 410 base::android::ConvertUTF16ToJavaString(env, node->GetText()).obj(), |
| 411 node->IsLink()); | 411 node->IsLink(), |
| 412 node->IsEditableText()); | |
| 412 } | 413 } |
| 413 base::string16 element_id; | 414 base::string16 element_id; |
| 414 if (node->GetHtmlAttribute("id", &element_id)) { | 415 if (node->GetHtmlAttribute("id", &element_id)) { |
| 415 Java_BrowserAccessibilityManager_setAccessibilityNodeInfoViewIdResourceName( | 416 Java_BrowserAccessibilityManager_setAccessibilityNodeInfoViewIdResourceName( |
| 416 env, obj, info, | 417 env, obj, info, |
| 417 base::android::ConvertUTF16ToJavaString(env, element_id).obj()); | 418 base::android::ConvertUTF16ToJavaString(env, element_id).obj()); |
| 418 } | 419 } |
| 419 | 420 |
| 420 gfx::Rect absolute_rect = node->GetLocalBoundsRect(); | 421 gfx::Rect absolute_rect = node->GetLocalBoundsRect(); |
| 421 gfx::Rect parent_relative_rect = absolute_rect; | 422 gfx::Rect parent_relative_rect = absolute_rect; |
| (...skipping 521 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 943 | 944 |
| 944 JNIEnv* env = AttachCurrentThread(); | 945 JNIEnv* env = AttachCurrentThread(); |
| 945 return root_manager->java_ref().get(env); | 946 return root_manager->java_ref().get(env); |
| 946 } | 947 } |
| 947 | 948 |
| 948 bool RegisterBrowserAccessibilityManager(JNIEnv* env) { | 949 bool RegisterBrowserAccessibilityManager(JNIEnv* env) { |
| 949 return RegisterNativesImpl(env); | 950 return RegisterNativesImpl(env); |
| 950 } | 951 } |
| 951 | 952 |
| 952 } // namespace content | 953 } // namespace content |
| OLD | NEW |