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

Unified Diff: ui/accessibility/ax_node_data.h

Issue 2873373005: Add custom action support (Closed)
Patch Set: Rebase. Created 3 years, 7 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: ui/accessibility/ax_node_data.h
diff --git a/ui/accessibility/ax_node_data.h b/ui/accessibility/ax_node_data.h
index 037e074015701c60adc0f56df10ad8eb2356264f..33d0425efb6978c664b8e2a16a6e9b6c2d0b33e6 100644
--- a/ui/accessibility/ax_node_data.h
+++ b/ui/accessibility/ax_node_data.h
@@ -86,6 +86,12 @@ struct AX_EXPORT AXNodeData {
bool GetIntListAttribute(AXIntListAttribute attribute,
std::vector<int32_t>* value) const;
+ bool HasStringListAttribute(AXStringListAttribute attribute) const;
+ const std::vector<std::string>& GetStringListAttribute(
+ AXStringListAttribute attribute) const;
+ bool GetStringListAttribute(AXStringListAttribute attribute,
+ std::vector<std::string>* value) const;
+
bool GetHtmlAttribute(const char* attr, base::string16* value) const;
bool GetHtmlAttribute(const char* attr, std::string* value) const;
@@ -97,6 +103,8 @@ struct AX_EXPORT AXNodeData {
void AddBoolAttribute(AXBoolAttribute attribute, bool value);
void AddIntListAttribute(AXIntListAttribute attribute,
const std::vector<int32_t>& value);
+ void AddStringListAttribute(AXStringListAttribute attribute,
+ const std::vector<std::string>& value);
// Convenience functions, mainly for writing unit tests.
// Equivalent to AddStringAttribute(ATTR_NAME, name).
@@ -124,6 +132,8 @@ struct AX_EXPORT AXNodeData {
std::vector<std::pair<AXBoolAttribute, bool>> bool_attributes;
std::vector<std::pair<AXIntListAttribute, std::vector<int32_t>>>
intlist_attributes;
+ std::vector<std::pair<AXStringListAttribute, std::vector<std::string>>>
+ stringlist_attributes;
base::StringPairs html_attributes;
std::vector<int32_t> child_ids;

Powered by Google App Engine
This is Rietveld 408576698