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

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: Clean up callbacks before end of OnRenderProcessGone 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
« no previous file with comments | « content/renderer/render_frame_impl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/render_frame_impl.cc
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
index 93029e3f14a69e9a308fdcc205568f9ac5cfa18c..bf54e6da56e6e131977dedb7de1ed271261160c2 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 callback_id) {
+ ui::AXTreeUpdate response;
+ RendererAccessibility::SnapshotAccessibilityTree(this, &response);
+ Send(new AccessibilityHostMsg_SnapshotResponse(
+ routing_id_, callback_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
« no previous file with comments | « content/renderer/render_frame_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698