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

Unified Diff: ui/accessibility/ax_node_data.h

Issue 2799413002: Views a11y: Add AXNodeData.actions bitfield to indicate supported actions by UI. (Closed)
Patch Set: Fix tests broken from 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..8d64ef51f39f54003f408e5c0dd17474d1cd1a7f 100644
--- a/ui/accessibility/ax_node_data.h
+++ b/ui/accessibility/ax_node_data.h
@@ -106,9 +106,13 @@ struct AX_EXPORT AXNodeData {
void SetValue(const std::string& value);
void SetValue(const base::string16& value);
- // Set or check bits in |state|.
- bool HasState(ui::AXState state_flag) const;
- void AddState(ui::AXState state_flag);
+ // Returns true if the given enum bit is 1.
+ bool HasState(ui::AXState state_enum) const;
+ bool HasAction(ui::AXAction state_enum) const;
+
+ // Set bits in the given enum's corresponding bitfield.
+ void AddState(ui::AXState state_enum);
+ void AddAction(ui::AXAction action_enum);
// Return a string representation of this data, for debugging.
virtual std::string ToString() const;
@@ -118,6 +122,7 @@ struct AX_EXPORT AXNodeData {
int32_t id;
AXRole role;
uint32_t state;
+ uint32_t actions;
std::vector<std::pair<AXStringAttribute, std::string>> string_attributes;
std::vector<std::pair<AXIntAttribute, int32_t>> int_attributes;
std::vector<std::pair<AXFloatAttribute, float>> float_attributes;

Powered by Google App Engine
This is Rietveld 408576698