OLD | NEW |
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 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
172 base::android::ConvertUTF16ToJavaString( | 172 base::android::ConvertUTF16ToJavaString( |
173 env, android_node->GetText()).obj()); | 173 env, android_node->GetText()).obj()); |
174 break; | 174 break; |
175 } | 175 } |
176 case ui::AX_EVENT_TEXT_SELECTION_CHANGED: | 176 case ui::AX_EVENT_TEXT_SELECTION_CHANGED: |
177 Java_BrowserAccessibilityManager_handleTextSelectionChanged( | 177 Java_BrowserAccessibilityManager_handleTextSelectionChanged( |
178 env, obj.obj(), node->GetId()); | 178 env, obj.obj(), node->GetId()); |
179 break; | 179 break; |
180 case ui::AX_EVENT_TEXT_CHANGED: | 180 case ui::AX_EVENT_TEXT_CHANGED: |
181 case ui::AX_EVENT_VALUE_CHANGED: | 181 case ui::AX_EVENT_VALUE_CHANGED: |
182 if (node->IsEditableText() && GetFocus(GetRoot()) == node) { | 182 if (android_node->IsEditableText() && GetFocus(GetRoot()) == node) { |
183 Java_BrowserAccessibilityManager_handleEditableTextChanged( | 183 Java_BrowserAccessibilityManager_handleEditableTextChanged( |
184 env, obj.obj(), node->GetId()); | 184 env, obj.obj(), node->GetId()); |
185 } else if (android_node->IsSlider()) { | 185 } else if (android_node->IsSlider()) { |
186 Java_BrowserAccessibilityManager_handleSliderChanged( | 186 Java_BrowserAccessibilityManager_handleSliderChanged( |
187 env, obj.obj(), node->GetId()); | 187 env, obj.obj(), node->GetId()); |
188 } | 188 } |
189 break; | 189 break; |
190 default: | 190 default: |
191 // There are some notifications that aren't meaningful on Android. | 191 // There are some notifications that aren't meaningful on Android. |
192 // It's okay to skip them. | 192 // It's okay to skip them. |
(...skipping 650 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
843 BrowserAccessibilityManagerAndroid::UseRootScrollOffsetsWhenComputingBounds() { | 843 BrowserAccessibilityManagerAndroid::UseRootScrollOffsetsWhenComputingBounds() { |
844 // The Java layer handles the root scroll offset. | 844 // The Java layer handles the root scroll offset. |
845 return false; | 845 return false; |
846 } | 846 } |
847 | 847 |
848 bool RegisterBrowserAccessibilityManager(JNIEnv* env) { | 848 bool RegisterBrowserAccessibilityManager(JNIEnv* env) { |
849 return RegisterNativesImpl(env); | 849 return RegisterNativesImpl(env); |
850 } | 850 } |
851 | 851 |
852 } // namespace content | 852 } // namespace content |
OLD | NEW |