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

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

Issue 1927953003: Merge to M51: Only fire accessible load complete events on the main frame on Android. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2704
Patch Set: Created 4 years, 7 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 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
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