| 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 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 207 HandleHoverEvent(node); | 207 HandleHoverEvent(node); |
| 208 return; | 208 return; |
| 209 } | 209 } |
| 210 | 210 |
| 211 // Always send AccessibilityEvent.TYPE_WINDOW_CONTENT_CHANGED to notify | 211 // Always send AccessibilityEvent.TYPE_WINDOW_CONTENT_CHANGED to notify |
| 212 // the Android system that the accessibility hierarchy rooted at this | 212 // the Android system that the accessibility hierarchy rooted at this |
| 213 // node has changed. | 213 // node has changed. |
| 214 Java_BrowserAccessibilityManager_handleContentChanged( | 214 Java_BrowserAccessibilityManager_handleContentChanged( |
| 215 env, obj.obj(), node->unique_id()); | 215 env, obj.obj(), node->unique_id()); |
| 216 | 216 |
| 217 // Ignore load complete events on iframes. |
| 218 if (event_type == ui::AX_EVENT_LOAD_COMPLETE && |
| 219 node->manager() != GetRootManager()) { |
| 220 return; |
| 221 } |
| 222 |
| 217 switch (event_type) { | 223 switch (event_type) { |
| 218 case ui::AX_EVENT_LOAD_COMPLETE: | 224 case ui::AX_EVENT_LOAD_COMPLETE: |
| 219 Java_BrowserAccessibilityManager_handlePageLoaded( | 225 Java_BrowserAccessibilityManager_handlePageLoaded( |
| 220 env, obj.obj(), GetFocus()->unique_id()); | 226 env, obj.obj(), GetFocus()->unique_id()); |
| 221 break; | 227 break; |
| 222 case ui::AX_EVENT_FOCUS: | 228 case ui::AX_EVENT_FOCUS: |
| 223 Java_BrowserAccessibilityManager_handleFocusChanged( | 229 Java_BrowserAccessibilityManager_handleFocusChanged( |
| 224 env, obj.obj(), node->unique_id()); | 230 env, obj.obj(), node->unique_id()); |
| 225 break; | 231 break; |
| 226 case ui::AX_EVENT_CHECKED_STATE_CHANGED: | 232 case ui::AX_EVENT_CHECKED_STATE_CHANGED: |
| (...skipping 717 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 944 | 950 |
| 945 JNIEnv* env = AttachCurrentThread(); | 951 JNIEnv* env = AttachCurrentThread(); |
| 946 return root_manager->java_ref().get(env); | 952 return root_manager->java_ref().get(env); |
| 947 } | 953 } |
| 948 | 954 |
| 949 bool RegisterBrowserAccessibilityManager(JNIEnv* env) { | 955 bool RegisterBrowserAccessibilityManager(JNIEnv* env) { |
| 950 return RegisterNativesImpl(env); | 956 return RegisterNativesImpl(env); |
| 951 } | 957 } |
| 952 | 958 |
| 953 } // namespace content | 959 } // namespace content |
| OLD | NEW |