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 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 AccessibilityHostMsg_FindInPageResultParams params; | 101 AccessibilityHostMsg_FindInPageResultParams params; |
102 params.request_id = identifier; | 102 params.request_id = identifier; |
103 params.match_index = match_index; | 103 params.match_index = match_index; |
104 params.start_id = start_object.axID(); | 104 params.start_id = start_object.axID(); |
105 params.start_offset = start_offset; | 105 params.start_offset = start_offset; |
106 params.end_id = end_object.axID(); | 106 params.end_id = end_object.axID(); |
107 params.end_offset = end_offset; | 107 params.end_offset = end_offset; |
108 Send(new AccessibilityHostMsg_FindInPageResult(routing_id(), params)); | 108 Send(new AccessibilityHostMsg_FindInPageResult(routing_id(), params)); |
109 } | 109 } |
110 | 110 |
111 void RendererAccessibility::FocusedNodeChanged(const WebNode& node) { | 111 void RendererAccessibility::AccessibilityFocusedNodeChanged( |
| 112 const WebNode& node) { |
112 const WebDocument& document = GetMainDocument(); | 113 const WebDocument& document = GetMainDocument(); |
113 if (document.isNull()) | 114 if (document.isNull()) |
114 return; | 115 return; |
115 | 116 |
116 if (node.isNull()) { | 117 if (node.isNull()) { |
117 // When focus is cleared, implicitly focus the document. | 118 // When focus is cleared, implicitly focus the document. |
118 // TODO(dmazzoni): Make Blink send this notification instead. | 119 // TODO(dmazzoni): Make Blink send this notification instead. |
119 HandleAXEvent(document.accessibilityObject(), ui::AX_EVENT_BLUR); | 120 HandleAXEvent(document.accessibilityObject(), ui::AX_EVENT_BLUR); |
120 } | 121 } |
121 } | 122 } |
(...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
485 LOG(WARNING) << "SetTextSelection on invalid object id " << acc_obj_id; | 486 LOG(WARNING) << "SetTextSelection on invalid object id " << acc_obj_id; |
486 #endif | 487 #endif |
487 return; | 488 return; |
488 } | 489 } |
489 | 490 |
490 obj.setValue(value); | 491 obj.setValue(value); |
491 HandleAXEvent(obj, ui::AX_EVENT_VALUE_CHANGED); | 492 HandleAXEvent(obj, ui::AX_EVENT_VALUE_CHANGED); |
492 } | 493 } |
493 | 494 |
494 } // namespace content | 495 } // namespace content |
OLD | NEW |