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

Unified Diff: content/common/ax_content_node_data.h

Issue 1407413002: Move some AX attrs from AXNodeData to AXTreeData. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 2 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/common/ax_content_node_data.h
diff --git a/content/common/ax_content_node_data.h b/content/common/ax_content_node_data.h
index 84411733d656f8b24a777366a8f85be94c72ad4e..f6148d472bd706dce6b0a13983349a79d595ba0e 100644
--- a/content/common/ax_content_node_data.h
+++ b/content/common/ax_content_node_data.h
@@ -7,16 +7,12 @@
#include "content/common/content_export.h"
#include "ui/accessibility/ax_node_data.h"
+#include "ui/accessibility/ax_tree_data.h"
+#include "ui/accessibility/ax_tree_update.h"
namespace content {
enum AXContentIntAttribute {
- // The routing ID of this root node.
- AX_CONTENT_ATTR_ROUTING_ID,
-
- // The routing ID of this tree's parent.
- AX_CONTENT_ATTR_PARENT_ROUTING_ID,
-
// The routing ID of this node's child tree.
AX_CONTENT_ATTR_CHILD_ROUTING_ID,
@@ -46,6 +42,25 @@ struct CONTENT_EXPORT AXContentNodeData : public ui::AXNodeData {
std::vector<std::pair<AXContentIntAttribute, int32> > content_int_attributes;
};
+// A subclass of AXTreeData that contains extra fields for
+// content-layer-specific AX attributes.
+struct CONTENT_EXPORT AXContentTreeData : public ui::AXTreeData {
+ AXContentTreeData();
+ ~AXContentTreeData() override;
+
+ // Return a string representation of this data, for debugging.
+ std::string ToString() const override;
+
+ // The routing ID of this frame.
+ int routing_id;
+
+ // The routing ID of the parent frame.
+ int parent_routing_id;
+};
+
+typedef ui::AXTreeUpdateBase<content::AXContentNodeData,
+ content::AXContentTreeData> AXContentTreeUpdate;
+
} // namespace content
#endif // CONTENT_COMMON_AX_CONTENT_NODE_DATA_H_

Powered by Google App Engine
This is Rietveld 408576698