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

Unified Diff: content/renderer/render_frame_impl.cc

Issue 1051923003: Add a WebContentsImpl API to snapshot the accessibility tree. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed and finished test Created 5 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: content/renderer/render_frame_impl.cc
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
index 57a29fc7b4a32506dca003f56547ecfec8849d14..0f19f2b185841337f223450276e2858c0249dcaf 100644
--- a/content/renderer/render_frame_impl.cc
+++ b/content/renderer/render_frame_impl.cc
@@ -1042,6 +1042,8 @@ bool RenderFrameImpl::OnMessageReceived(const IPC::Message& msg) {
OnAddStyleSheetByURL)
IPC_MESSAGE_HANDLER(FrameMsg_SetAccessibilityMode,
OnSetAccessibilityMode)
+ IPC_MESSAGE_HANDLER(AccessibilityMsg_SnapshotTree,
+ OnSnapshotAccessibilityTree)
IPC_MESSAGE_HANDLER(FrameMsg_DisownOpener, OnDisownOpener)
IPC_MESSAGE_HANDLER(FrameMsg_CommitNavigation, OnCommitNavigation)
IPC_MESSAGE_HANDLER(FrameMsg_DidUpdateSandboxFlags, OnDidUpdateSandboxFlags)
@@ -1563,6 +1565,12 @@ void RenderFrameImpl::OnSetAccessibilityMode(AccessibilityMode new_mode) {
renderer_accessibility_ = new RendererAccessibility(this);
}
+void RenderFrameImpl::OnSnapshotAccessibilityTree(int token) {
+ ui::AXTreeUpdate response;
+ RendererAccessibility::SnapshotAccessibilityTree(this, &response);
+ Send(new AccessibilityHostMsg_SnapshotResponse(routing_id_, token, response));
+}
+
void RenderFrameImpl::OnDisownOpener() {
// TODO(creis): We should only see this for main frames for now. To support
// disowning the opener on subframes, we will need to move WebContentsImpl's
« content/browser/web_contents/web_contents_impl.cc ('K') | « content/renderer/render_frame_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698