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_; |