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

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

Issue 1894113003: Only fire accessible load complete events on the main frame on Android. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Move load complete check after handleContentChanged Created 4 years, 8 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 <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
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
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
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