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

Unified Diff: content/renderer/accessibility/blink_ax_tree_source.h

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/content_tests.gypi ('k') | content/renderer/accessibility/blink_ax_tree_source.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/accessibility/blink_ax_tree_source.h
diff --git a/content/renderer/accessibility/blink_ax_tree_source.h b/content/renderer/accessibility/blink_ax_tree_source.h
index b08108b12e576a2446774cba67f37638906f058b..ae93ff4b115ee5e53d858fc79aad0b6bbb8927a8 100644
--- a/content/renderer/accessibility/blink_ax_tree_source.h
+++ b/content/renderer/accessibility/blink_ax_tree_source.h
@@ -19,6 +19,11 @@ class BlinkAXTreeSource
BlinkAXTreeSource(RenderFrameImpl* render_frame);
~BlinkAXTreeSource() override;
+ // It may be necessary to call SetRoot if you're using a WebScopedAXContext,
+ // because BlinkAXTreeSource can't get the root of the tree from the
+ // WebDocument if accessibility isn't enabled globally.
+ void SetRoot(blink::WebAXObject root);
+
// Call this to have BlinkAXTreeSource collect a mapping from
// node ids to the frame routing id for an out-of-process iframe during
// calls to SerializeNode.
@@ -54,6 +59,7 @@ class BlinkAXTreeSource
private:
RenderFrameImpl* render_frame_;
+ blink::WebAXObject root_;
std::map<int32, int>* node_to_frame_routing_id_map_;
std::map<int32, int>* node_to_browser_plugin_instance_id_map_;
int accessibility_focus_id_;
« no previous file with comments | « content/content_tests.gypi ('k') | content/renderer/accessibility/blink_ax_tree_source.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698