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

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

Issue 2522543004: Add support for retrieving image thumbnails as part of the accessibility tree. (Closed)
Patch Set: Clarified maxSize Created 4 years, 1 month 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/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 2f4001c558015deef532eb487f86d43037451c0c..aecc61ffcc429c66666ff14d499c843edb4a6993 100644
--- a/content/renderer/accessibility/blink_ax_tree_source.h
+++ b/content/renderer/accessibility/blink_ax_tree_source.h
@@ -54,6 +54,18 @@ class BlinkAXTreeSource
// Walks up the ancestor chain to see if this is a descendant of the root.
bool IsInTree(blink::WebAXObject node) const;
+ // Set the id of the node to fetch image data for. Normally the content
+ // of images is not part of the accessibility tree, but one node at a
+ // time can be designated as the image data node, which will send the
+ // contents of the image with each accessibility update until another
+ // node is designated.
+ int image_data_node_id() { return image_data_node_id_; }
+ void set_image_data_node_id(int id) { image_data_node_id_ = id; }
+
+ void set_max_image_data_size(const gfx::Size& size) {
+ max_image_data_size_ = size;
+ }
+
// Set the id of the node with accessibility focus. The node with
// accessibility focus will force loading inline text box children,
// which aren't always loaded by default on all platforms.
@@ -100,10 +112,15 @@ class BlinkAXTreeSource
blink::WebAXObject explicit_root_;
// The id of the object with accessibility focus.
- int accessibility_focus_id_;
+ int accessibility_focus_id_ = -1;
+
+ // The id of the object to fetch image data for.
+ int image_data_node_id_ = -1;
+
+ gfx::Size max_image_data_size_;
// These are updated when calling |Freeze|.
- bool frozen_;
+ bool frozen_ = false;
blink::WebDocument document_;
blink::WebAXObject root_;
blink::WebAXObject focus_;
« no previous file with comments | « content/browser/accessibility/browser_accessibility_manager.cc ('k') | content/renderer/accessibility/blink_ax_tree_source.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698