Chromium Code Reviews| 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 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 210 | 210 |
| 211 // Layout changes are handled in OnLocationChanges. | 211 // Layout changes are handled in OnLocationChanges. |
| 212 if (event_type == ui::AX_EVENT_LAYOUT_COMPLETE) | 212 if (event_type == ui::AX_EVENT_LAYOUT_COMPLETE) |
| 213 return; | 213 return; |
| 214 | 214 |
| 215 if (event_type == ui::AX_EVENT_HOVER) { | 215 if (event_type == ui::AX_EVENT_HOVER) { |
| 216 HandleHoverEvent(node); | 216 HandleHoverEvent(node); |
| 217 return; | 217 return; |
| 218 } | 218 } |
| 219 | 219 |
| 220 // Ignore load complete events on iframes. | |
| 221 if (event_type == ui::AX_EVENT_LOAD_COMPLETE && | |
| 222 node->manager() != GetRootManager()) { | |
| 223 return; | |
| 224 } | |
| 225 | |
| 220 // Always send AccessibilityEvent.TYPE_WINDOW_CONTENT_CHANGED to notify | 226 // Always send AccessibilityEvent.TYPE_WINDOW_CONTENT_CHANGED to notify |
| 221 // the Android system that the accessibility hierarchy rooted at this | 227 // the Android system that the accessibility hierarchy rooted at this |
| 222 // node has changed. | 228 // node has changed. |
|
David Tseng
2016/04/18 23:21:56
Do you still need to do this?
dmazzoni
2016/04/19 18:52:23
Yes, Peter says it's definitely needed for Braille
David Tseng
2016/04/19 20:36:30
I wasn't clear, sorry: in the case of a load compl
| |
| 223 Java_BrowserAccessibilityManager_handleContentChanged( | 229 Java_BrowserAccessibilityManager_handleContentChanged( |
| 224 env, obj.obj(), node->unique_id()); | 230 env, obj.obj(), node->unique_id()); |
| 225 | 231 |
| 226 switch (event_type) { | 232 switch (event_type) { |
| 227 case ui::AX_EVENT_LOAD_COMPLETE: | 233 case ui::AX_EVENT_LOAD_COMPLETE: |
| 228 Java_BrowserAccessibilityManager_handlePageLoaded( | 234 Java_BrowserAccessibilityManager_handlePageLoaded( |
| 229 env, obj.obj(), GetFocus()->unique_id()); | 235 env, obj.obj(), GetFocus()->unique_id()); |
| 230 break; | 236 break; |
| 231 case ui::AX_EVENT_FOCUS: | 237 case ui::AX_EVENT_FOCUS: |
| 232 Java_BrowserAccessibilityManager_handleFocusChanged( | 238 Java_BrowserAccessibilityManager_handleFocusChanged( |
| (...skipping 706 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 939 | 945 |
| 940 JNIEnv* env = AttachCurrentThread(); | 946 JNIEnv* env = AttachCurrentThread(); |
| 941 return root_manager->java_ref().get(env); | 947 return root_manager->java_ref().get(env); |
| 942 } | 948 } |
| 943 | 949 |
| 944 bool RegisterBrowserAccessibilityManager(JNIEnv* env) { | 950 bool RegisterBrowserAccessibilityManager(JNIEnv* env) { |
| 945 return RegisterNativesImpl(env); | 951 return RegisterNativesImpl(env); |
| 946 } | 952 } |
| 947 | 953 |
| 948 } // namespace content | 954 } // namespace content |
| OLD | NEW |