Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(331)

Side by Side Diff: content/browser/accessibility/browser_accessibility_manager_android.cc

Issue 1654193002: Include a role description string in node info for Android accessibility. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update all Android test expectations Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 314 matching lines...) Expand 10 before | Expand all | Expand 10 after
325 } 325 }
326 bool is_root = node->GetParent() == NULL; 326 bool is_root = node->GetParent() == NULL;
327 Java_BrowserAccessibilityManager_setAccessibilityNodeInfoLocation( 327 Java_BrowserAccessibilityManager_setAccessibilityNodeInfoLocation(
328 env, obj, info, 328 env, obj, info,
329 id, 329 id,
330 absolute_rect.x(), absolute_rect.y(), 330 absolute_rect.x(), absolute_rect.y(),
331 parent_relative_rect.x(), parent_relative_rect.y(), 331 parent_relative_rect.x(), parent_relative_rect.y(),
332 absolute_rect.width(), absolute_rect.height(), 332 absolute_rect.width(), absolute_rect.height(),
333 is_root); 333 is_root);
334 334
335 Java_BrowserAccessibilityManager_setAccessibilityNodeInfoKitKatAttributes(
336 env, obj, info,
337 base::android::ConvertUTF16ToJavaString(
338 env, node->GetRoleDescription()).obj());
339
335 Java_BrowserAccessibilityManager_setAccessibilityNodeInfoLollipopAttributes( 340 Java_BrowserAccessibilityManager_setAccessibilityNodeInfoLollipopAttributes(
336 env, obj, info, 341 env, obj, info,
337 node->CanOpenPopup(), 342 node->CanOpenPopup(),
338 node->IsContentInvalid(), 343 node->IsContentInvalid(),
339 node->IsDismissable(), 344 node->IsDismissable(),
340 node->IsMultiLine(), 345 node->IsMultiLine(),
341 node->AndroidInputType(), 346 node->AndroidInputType(),
342 node->AndroidLiveRegionType()); 347 node->AndroidLiveRegionType());
343 if (node->IsCollection()) { 348 if (node->IsCollection()) {
344 Java_BrowserAccessibilityManager_setAccessibilityNodeInfoCollectionInfo( 349 Java_BrowserAccessibilityManager_setAccessibilityNodeInfoCollectionInfo(
(...skipping 498 matching lines...) Expand 10 before | Expand all | Expand 10 after
843 BrowserAccessibilityManagerAndroid::UseRootScrollOffsetsWhenComputingBounds() { 848 BrowserAccessibilityManagerAndroid::UseRootScrollOffsetsWhenComputingBounds() {
844 // The Java layer handles the root scroll offset. 849 // The Java layer handles the root scroll offset.
845 return false; 850 return false;
846 } 851 }
847 852
848 bool RegisterBrowserAccessibilityManager(JNIEnv* env) { 853 bool RegisterBrowserAccessibilityManager(JNIEnv* env) {
849 return RegisterNativesImpl(env); 854 return RegisterNativesImpl(env);
850 } 855 }
851 856
852 } // namespace content 857 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698