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

Side by Side Diff: content/renderer/accessibility/renderer_accessibility_complete.cc

Issue 268543008: Cross-process iframe accessibility. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rewritten based on RFHI instead of RVHI Created 6 years, 4 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/renderer/accessibility/renderer_accessibility_complete.h" 5 #include "content/renderer/accessibility/renderer_accessibility_complete.h"
6 6
7 #include <queue> 7 #include <queue>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 194
195 // When we get a "selected children changed" event, Blink 195 // When we get a "selected children changed" event, Blink
196 // doesn't also send us events for each child that changed 196 // doesn't also send us events for each child that changed
197 // selection state, so make sure we re-send that whole subtree. 197 // selection state, so make sure we re-send that whole subtree.
198 if (event.event_type == 198 if (event.event_type ==
199 ui::AX_EVENT_SELECTED_CHILDREN_CHANGED) { 199 ui::AX_EVENT_SELECTED_CHILDREN_CHANGED) {
200 serializer_.DeleteClientSubtree(obj); 200 serializer_.DeleteClientSubtree(obj);
201 } 201 }
202 202
203 AccessibilityHostMsg_EventParams event_msg; 203 AccessibilityHostMsg_EventParams event_msg;
204 tree_source_.CollectChildFrameIdMapping(
205 &event_msg.frame_routing_ids);
204 event_msg.event_type = event.event_type; 206 event_msg.event_type = event.event_type;
205 event_msg.id = event.id; 207 event_msg.id = event.id;
206 serializer_.SerializeChanges(obj, &event_msg.update); 208 serializer_.SerializeChanges(obj, &event_msg.update);
207 event_msgs.push_back(event_msg); 209 event_msgs.push_back(event_msg);
208 210
209 // For each node in the update, set the location in our map from 211 // For each node in the update, set the location in our map from
210 // ids to locations. 212 // ids to locations.
211 for (size_t i = 0; i < event_msg.update.nodes.size(); ++i) { 213 for (size_t i = 0; i < event_msg.update.nodes.size(); ++i) {
212 locations_[event_msg.update.nodes[i].id] = 214 locations_[event_msg.update.nodes[i].id] =
213 event_msg.update.nodes[i].location; 215 event_msg.update.nodes[i].location;
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
403 render_frame_->GetRenderView()->GetWebView()->clearFocusedElement(); 405 render_frame_->GetRenderView()->GetWebView()->clearFocusedElement();
404 else 406 else
405 obj.setFocused(true); 407 obj.setFocused(true);
406 } 408 }
407 409
408 void RendererAccessibilityComplete::OnFatalError() { 410 void RendererAccessibilityComplete::OnFatalError() {
409 CHECK(false) << "Invalid accessibility tree."; 411 CHECK(false) << "Invalid accessibility tree.";
410 } 412 }
411 413
412 } // namespace content 414 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698