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

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

Issue 1899823002: Uses the activedescendant_changed event received from Blink to fire the right focus event (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed menu-list-open Layout test. Created 4 years, 6 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 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 bool BrowserAccessibilityManagerAndroid::ShouldExposePasswordText() { 185 bool BrowserAccessibilityManagerAndroid::ShouldExposePasswordText() {
186 JNIEnv* env = AttachCurrentThread(); 186 JNIEnv* env = AttachCurrentThread();
187 ScopedJavaLocalRef<jobject> obj = GetJavaRefFromRootManager(); 187 ScopedJavaLocalRef<jobject> obj = GetJavaRefFromRootManager();
188 if (obj.is_null()) 188 if (obj.is_null())
189 return false; 189 return false;
190 190
191 return Java_BrowserAccessibilityManager_shouldExposePasswordText( 191 return Java_BrowserAccessibilityManager_shouldExposePasswordText(
192 env, obj.obj()); 192 env, obj.obj());
193 } 193 }
194 194
195 BrowserAccessibility* BrowserAccessibilityManagerAndroid::GetFocus() {
196 BrowserAccessibility* focus = BrowserAccessibilityManager::GetFocus();
197 return GetActiveDescendant(focus);
198 }
199
195 void BrowserAccessibilityManagerAndroid::NotifyAccessibilityEvent( 200 void BrowserAccessibilityManagerAndroid::NotifyAccessibilityEvent(
196 BrowserAccessibilityEvent::Source source, 201 BrowserAccessibilityEvent::Source source,
197 ui::AXEvent event_type, 202 ui::AXEvent event_type,
198 BrowserAccessibility* node) { 203 BrowserAccessibility* node) {
199 JNIEnv* env = AttachCurrentThread(); 204 JNIEnv* env = AttachCurrentThread();
200 ScopedJavaLocalRef<jobject> obj = GetJavaRefFromRootManager(); 205 ScopedJavaLocalRef<jobject> obj = GetJavaRefFromRootManager();
201 if (obj.is_null()) 206 if (obj.is_null())
202 return; 207 return;
203 208
204 BrowserAccessibilityAndroid* android_node = 209 BrowserAccessibilityAndroid* android_node =
(...skipping 744 matching lines...) Expand 10 before | Expand all | Expand 10 after
949 954
950 JNIEnv* env = AttachCurrentThread(); 955 JNIEnv* env = AttachCurrentThread();
951 return root_manager->java_ref().get(env); 956 return root_manager->java_ref().get(env);
952 } 957 }
953 958
954 bool RegisterBrowserAccessibilityManager(JNIEnv* env) { 959 bool RegisterBrowserAccessibilityManager(JNIEnv* env) {
955 return RegisterNativesImpl(env); 960 return RegisterNativesImpl(env);
956 } 961 }
957 962
958 } // namespace content 963 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698