| OLD | NEW |
| 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.h" | 5 #include "content/renderer/accessibility/renderer_accessibility.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 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 246 serializer_.SerializeChanges(obj, &event_msg.update); | 246 serializer_.SerializeChanges(obj, &event_msg.update); |
| 247 event_msgs.push_back(event_msg); | 247 event_msgs.push_back(event_msg); |
| 248 | 248 |
| 249 // For each node in the update, set the location in our map from | 249 // For each node in the update, set the location in our map from |
| 250 // ids to locations. | 250 // ids to locations. |
| 251 for (size_t i = 0; i < event_msg.update.nodes.size(); ++i) { | 251 for (size_t i = 0; i < event_msg.update.nodes.size(); ++i) { |
| 252 locations_[event_msg.update.nodes[i].id] = | 252 locations_[event_msg.update.nodes[i].id] = |
| 253 event_msg.update.nodes[i].location; | 253 event_msg.update.nodes[i].location; |
| 254 } | 254 } |
| 255 | 255 |
| 256 VLOG(0) << "Accessibility event: " << ui::ToString(event.event_type) | 256 DVLOG(0) << "Accessibility event: " << ui::ToString(event.event_type) |
| 257 << " on node id " << event_msg.id | 257 << " on node id " << event_msg.id |
| 258 << "\n" << event_msg.update.ToString(); | 258 << "\n" << event_msg.update.ToString(); |
| 259 } | 259 } |
| 260 | 260 |
| 261 Send(new AccessibilityHostMsg_Events(routing_id(), event_msgs, reset_token_)); | 261 Send(new AccessibilityHostMsg_Events(routing_id(), event_msgs, reset_token_)); |
| 262 reset_token_ = 0; | 262 reset_token_ = 0; |
| 263 | 263 |
| 264 if (had_layout_complete_messages) | 264 if (had_layout_complete_messages) |
| 265 SendLocationChanges(); | 265 SendLocationChanges(); |
| 266 } | 266 } |
| 267 | 267 |
| 268 void RendererAccessibility::SendLocationChanges() { | 268 void RendererAccessibility::SendLocationChanges() { |
| (...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 460 #ifndef NDEBUG | 460 #ifndef NDEBUG |
| 461 LOG(WARNING) << "SetTextSelection on invalid object id " << acc_obj_id; | 461 LOG(WARNING) << "SetTextSelection on invalid object id " << acc_obj_id; |
| 462 #endif | 462 #endif |
| 463 return; | 463 return; |
| 464 } | 464 } |
| 465 | 465 |
| 466 obj.setValue(value); | 466 obj.setValue(value); |
| 467 } | 467 } |
| 468 | 468 |
| 469 } // namespace content | 469 } // namespace content |
| OLD | NEW |