| 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 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 217 HandleHoverEvent(node); | 217 HandleHoverEvent(node); |
| 218 return; | 218 return; |
| 219 } | 219 } |
| 220 | 220 |
| 221 // Always send AccessibilityEvent.TYPE_WINDOW_CONTENT_CHANGED to notify | 221 // Always send AccessibilityEvent.TYPE_WINDOW_CONTENT_CHANGED to notify |
| 222 // the Android system that the accessibility hierarchy rooted at this | 222 // the Android system that the accessibility hierarchy rooted at this |
| 223 // node has changed. | 223 // node has changed. |
| 224 Java_BrowserAccessibilityManager_handleContentChanged( | 224 Java_BrowserAccessibilityManager_handleContentChanged( |
| 225 env, obj.obj(), node->unique_id()); | 225 env, obj.obj(), node->unique_id()); |
| 226 | 226 |
| 227 // Ignore load complete events on iframes. |
| 228 if (event_type == ui::AX_EVENT_LOAD_COMPLETE && |
| 229 node->manager() != GetRootManager()) { |
| 230 return; |
| 231 } |
| 232 |
| 227 switch (event_type) { | 233 switch (event_type) { |
| 228 case ui::AX_EVENT_LOAD_COMPLETE: | 234 case ui::AX_EVENT_LOAD_COMPLETE: |
| 229 Java_BrowserAccessibilityManager_handlePageLoaded( | 235 Java_BrowserAccessibilityManager_handlePageLoaded( |
| 230 env, obj.obj(), GetFocus()->unique_id()); | 236 env, obj.obj(), GetFocus()->unique_id()); |
| 231 break; | 237 break; |
| 232 case ui::AX_EVENT_FOCUS: | 238 case ui::AX_EVENT_FOCUS: |
| 233 Java_BrowserAccessibilityManager_handleFocusChanged( | 239 Java_BrowserAccessibilityManager_handleFocusChanged( |
| 234 env, obj.obj(), node->unique_id()); | 240 env, obj.obj(), node->unique_id()); |
| 235 break; | 241 break; |
| 236 case ui::AX_EVENT_CHECKED_STATE_CHANGED: | 242 case ui::AX_EVENT_CHECKED_STATE_CHANGED: |
| (...skipping 703 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 940 | 946 |
| 941 JNIEnv* env = AttachCurrentThread(); | 947 JNIEnv* env = AttachCurrentThread(); |
| 942 return root_manager->java_ref().get(env); | 948 return root_manager->java_ref().get(env); |
| 943 } | 949 } |
| 944 | 950 |
| 945 bool RegisterBrowserAccessibilityManager(JNIEnv* env) { | 951 bool RegisterBrowserAccessibilityManager(JNIEnv* env) { |
| 946 return RegisterNativesImpl(env); | 952 return RegisterNativesImpl(env); |
| 947 } | 953 } |
| 948 | 954 |
| 949 } // namespace content | 955 } // namespace content |
| OLD | NEW |