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

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

Issue 2024053003: Revert of 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: 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
200 void BrowserAccessibilityManagerAndroid::NotifyAccessibilityEvent( 195 void BrowserAccessibilityManagerAndroid::NotifyAccessibilityEvent(
201 BrowserAccessibilityEvent::Source source, 196 BrowserAccessibilityEvent::Source source,
202 ui::AXEvent event_type, 197 ui::AXEvent event_type,
203 BrowserAccessibility* node) { 198 BrowserAccessibility* node) {
204 JNIEnv* env = AttachCurrentThread(); 199 JNIEnv* env = AttachCurrentThread();
205 ScopedJavaLocalRef<jobject> obj = GetJavaRefFromRootManager(); 200 ScopedJavaLocalRef<jobject> obj = GetJavaRefFromRootManager();
206 if (obj.is_null()) 201 if (obj.is_null())
207 return; 202 return;
208 203
209 BrowserAccessibilityAndroid* android_node = 204 BrowserAccessibilityAndroid* android_node =
(...skipping 744 matching lines...) Expand 10 before | Expand all | Expand 10 after
954 949
955 JNIEnv* env = AttachCurrentThread(); 950 JNIEnv* env = AttachCurrentThread();
956 return root_manager->java_ref().get(env); 951 return root_manager->java_ref().get(env);
957 } 952 }
958 953
959 bool RegisterBrowserAccessibilityManager(JNIEnv* env) { 954 bool RegisterBrowserAccessibilityManager(JNIEnv* env) {
960 return RegisterNativesImpl(env); 955 return RegisterNativesImpl(env);
961 } 956 }
962 957
963 } // namespace content 958 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698