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

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

Issue 812033016: Add RenderFrameObserver::FocusedNodeChanged (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix bad merge Created 5 years, 11 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
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.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
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
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
OLDNEW
« no previous file with comments | « content/renderer/accessibility/renderer_accessibility.h ('k') | content/renderer/render_frame_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698