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

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

Issue 920623002: Don't send extra text changed AX events on Android (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <cmath> 7 #include <cmath>
8 8
9 #include "base/android/jni_android.h" 9 #include "base/android/jni_android.h"
10 #include "base/android/jni_string.h" 10 #include "base/android/jni_string.h"
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 env, android_node->GetText()).obj()); 169 env, android_node->GetText()).obj());
170 break; 170 break;
171 } 171 }
172 case ui::AX_EVENT_TEXT_SELECTION_CHANGED: 172 case ui::AX_EVENT_TEXT_SELECTION_CHANGED:
173 Java_BrowserAccessibilityManager_handleTextSelectionChanged( 173 Java_BrowserAccessibilityManager_handleTextSelectionChanged(
174 env, obj.obj(), node->GetId()); 174 env, obj.obj(), node->GetId());
175 break; 175 break;
176 case ui::AX_EVENT_CHILDREN_CHANGED: 176 case ui::AX_EVENT_CHILDREN_CHANGED:
177 case ui::AX_EVENT_TEXT_CHANGED: 177 case ui::AX_EVENT_TEXT_CHANGED:
178 case ui::AX_EVENT_VALUE_CHANGED: 178 case ui::AX_EVENT_VALUE_CHANGED:
179 if (node->IsEditableText()) { 179 if (node->IsEditableText() && GetFocus(GetRoot()) == node) {
180 Java_BrowserAccessibilityManager_handleEditableTextChanged( 180 Java_BrowserAccessibilityManager_handleEditableTextChanged(
181 env, obj.obj(), node->GetId()); 181 env, obj.obj(), node->GetId());
182 } else if (android_node->IsSlider()) { 182 } else if (android_node->IsSlider()) {
183 Java_BrowserAccessibilityManager_handleSliderChanged( 183 Java_BrowserAccessibilityManager_handleSliderChanged(
184 env, obj.obj(), node->GetId()); 184 env, obj.obj(), node->GetId());
185 } 185 }
186 break; 186 break;
187 default: 187 default:
188 // There are some notifications that aren't meaningful on Android. 188 // There are some notifications that aren't meaningful on Android.
189 // It's okay to skip them. 189 // It's okay to skip them.
(...skipping 551 matching lines...) Expand 10 before | Expand all | Expand 10 after
741 BrowserAccessibilityManagerAndroid::UseRootScrollOffsetsWhenComputingBounds() { 741 BrowserAccessibilityManagerAndroid::UseRootScrollOffsetsWhenComputingBounds() {
742 // The Java layer handles the root scroll offset. 742 // The Java layer handles the root scroll offset.
743 return false; 743 return false;
744 } 744 }
745 745
746 bool RegisterBrowserAccessibilityManager(JNIEnv* env) { 746 bool RegisterBrowserAccessibilityManager(JNIEnv* env) {
747 return RegisterNativesImpl(env); 747 return RegisterNativesImpl(env);
748 } 748 }
749 749
750 } // namespace content 750 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698