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

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: Scoped trace, clean up callbacks Created 5 years, 8 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 38e058ac37a691d3ebe8b5206edf17567aa54f31..9799448932e50598a216433881516889f0a6f030 100644
--- a/content/renderer/render_frame_impl.cc
+++ b/content/renderer/render_frame_impl.cc
@@ -1049,6 +1049,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)
@@ -1579,6 +1581,13 @@ void RenderFrameImpl::OnSetAccessibilityMode(AccessibilityMode new_mode) {
renderer_accessibility_ = new RendererAccessibility(this);
}
+void RenderFrameImpl::OnSnapshotAccessibilityTree(int request_id) {
+ ui::AXTreeUpdate response;
+ RendererAccessibility::SnapshotAccessibilityTree(this, &response);
+ Send(new AccessibilityHostMsg_SnapshotResponse(
+ routing_id_, request_id, 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/renderer/render_frame_impl.h ('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