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

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

Issue 2430473003: Revert of Create AXAction and AXActionData as a way to simplify accessibility actions (Closed)
Patch Set: Created 4 years, 2 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 328 matching lines...) Expand 10 before | Expand all | Expand 10 after
339 const JavaParamRef<jobject>& obj, 339 const JavaParamRef<jobject>& obj,
340 jint id) { 340 jint id) {
341 return GetFromUniqueID(id) != NULL; 341 return GetFromUniqueID(id) != NULL;
342 } 342 }
343 343
344 void BrowserAccessibilityManagerAndroid::HitTest( 344 void BrowserAccessibilityManagerAndroid::HitTest(
345 JNIEnv* env, 345 JNIEnv* env,
346 const JavaParamRef<jobject>& obj, 346 const JavaParamRef<jobject>& obj,
347 jint x, 347 jint x,
348 jint y) { 348 jint y) {
349 BrowserAccessibilityManager::HitTest(gfx::Point(x, y)); 349 if (delegate())
350 delegate()->AccessibilityHitTest(gfx::Point(x, y));
350 } 351 }
351 352
352 jboolean BrowserAccessibilityManagerAndroid::IsEditableText( 353 jboolean BrowserAccessibilityManagerAndroid::IsEditableText(
353 JNIEnv* env, 354 JNIEnv* env,
354 const JavaParamRef<jobject>& obj, 355 const JavaParamRef<jobject>& obj,
355 jint id) { 356 jint id) {
356 BrowserAccessibilityAndroid* node = GetFromUniqueID(id); 357 BrowserAccessibilityAndroid* node = GetFromUniqueID(id);
357 if (!node) 358 if (!node)
358 return false; 359 return false;
359 360
(...skipping 519 matching lines...) Expand 10 before | Expand all | Expand 10 after
879 } 880 }
880 881
881 void BrowserAccessibilityManagerAndroid::SetAccessibilityFocus( 882 void BrowserAccessibilityManagerAndroid::SetAccessibilityFocus(
882 JNIEnv* env, 883 JNIEnv* env,
883 const JavaParamRef<jobject>& obj, 884 const JavaParamRef<jobject>& obj,
884 jint id) { 885 jint id) {
885 BrowserAccessibilityAndroid* node = GetFromUniqueID(id); 886 BrowserAccessibilityAndroid* node = GetFromUniqueID(id);
886 if (!node) 887 if (!node)
887 return; 888 return;
888 889
889 node->manager()->SetAccessibilityFocus(*node); 890 if (node->manager()->delegate()) {
891 node->manager()->delegate()->AccessibilitySetAccessibilityFocus(
892 node->GetId());
893 }
890 } 894 }
891 895
892 bool BrowserAccessibilityManagerAndroid::IsSlider( 896 bool BrowserAccessibilityManagerAndroid::IsSlider(
893 JNIEnv* env, 897 JNIEnv* env,
894 const JavaParamRef<jobject>& obj, 898 const JavaParamRef<jobject>& obj,
895 jint id) { 899 jint id) {
896 BrowserAccessibilityAndroid* node = GetFromUniqueID(id); 900 BrowserAccessibilityAndroid* node = GetFromUniqueID(id);
897 if (!node) 901 if (!node)
898 return false; 902 return false;
899 903
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
951 955
952 JNIEnv* env = AttachCurrentThread(); 956 JNIEnv* env = AttachCurrentThread();
953 return root_manager->java_ref().get(env); 957 return root_manager->java_ref().get(env);
954 } 958 }
955 959
956 bool RegisterBrowserAccessibilityManager(JNIEnv* env) { 960 bool RegisterBrowserAccessibilityManager(JNIEnv* env) {
957 return RegisterNativesImpl(env); 961 return RegisterNativesImpl(env);
958 } 962 }
959 963
960 } // namespace content 964 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698