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

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

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

Powered by Google App Engine
This is Rietveld 408576698