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

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

Issue 922883002: Don't send extra text changed AX events on Android (2) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@editable_text_events
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 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 Java_BrowserAccessibilityManager_announceLiveRegionText( 166 Java_BrowserAccessibilityManager_announceLiveRegionText(
167 env, obj.obj(), 167 env, obj.obj(),
168 base::android::ConvertUTF16ToJavaString( 168 base::android::ConvertUTF16ToJavaString(
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:
177 case ui::AX_EVENT_TEXT_CHANGED: 176 case ui::AX_EVENT_TEXT_CHANGED:
178 case ui::AX_EVENT_VALUE_CHANGED: 177 case ui::AX_EVENT_VALUE_CHANGED:
179 if (node->IsEditableText() && GetFocus(GetRoot()) == node) { 178 if (node->IsEditableText() && GetFocus(GetRoot()) == node) {
180 Java_BrowserAccessibilityManager_handleEditableTextChanged( 179 Java_BrowserAccessibilityManager_handleEditableTextChanged(
181 env, obj.obj(), node->GetId()); 180 env, obj.obj(), node->GetId());
182 } else if (android_node->IsSlider()) { 181 } else if (android_node->IsSlider()) {
183 Java_BrowserAccessibilityManager_handleSliderChanged( 182 Java_BrowserAccessibilityManager_handleSliderChanged(
184 env, obj.obj(), node->GetId()); 183 env, obj.obj(), node->GetId());
185 } 184 }
186 break; 185 break;
(...skipping 554 matching lines...) Expand 10 before | Expand all | Expand 10 after
741 BrowserAccessibilityManagerAndroid::UseRootScrollOffsetsWhenComputingBounds() { 740 BrowserAccessibilityManagerAndroid::UseRootScrollOffsetsWhenComputingBounds() {
742 // The Java layer handles the root scroll offset. 741 // The Java layer handles the root scroll offset.
743 return false; 742 return false;
744 } 743 }
745 744
746 bool RegisterBrowserAccessibilityManager(JNIEnv* env) { 745 bool RegisterBrowserAccessibilityManager(JNIEnv* env) {
747 return RegisterNativesImpl(env); 746 return RegisterNativesImpl(env);
748 } 747 }
749 748
750 } // namespace content 749 } // 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