summaryrefslogtreecommitdiff
path: root/chromium/ui/accessibility/ax_tree_update.h
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/ui/accessibility/ax_tree_update.h')
-rw-r--r--chromium/ui/accessibility/ax_tree_update.h17
1 files changed, 16 insertions, 1 deletions
diff --git a/chromium/ui/accessibility/ax_tree_update.h b/chromium/ui/accessibility/ax_tree_update.h
index 5225cdefb87..a27fc3b2377 100644
--- a/chromium/ui/accessibility/ax_tree_update.h
+++ b/chromium/ui/accessibility/ax_tree_update.h
@@ -13,7 +13,9 @@
#include <vector>
#include "base/strings/string_number_conversions.h"
+#include "ui/accessibility/ax_enum_util.h"
#include "ui/accessibility/ax_enums.mojom.h"
+#include "ui/accessibility/ax_event_intent.h"
#include "ui/accessibility/ax_node_data.h"
#include "ui/accessibility/ax_tree_data.h"
@@ -72,9 +74,12 @@ template<typename AXNodeData, typename AXTreeData> struct AXTreeUpdateBase {
// A vector of nodes to update, according to the rules above.
std::vector<AXNodeData> nodes;
- // The source of the event.
+ // The source of the event which generated this tree update.
ax::mojom::EventFrom event_from = ax::mojom::EventFrom::kNone;
+ // The event intents associated with this tree update.
+ std::vector<AXEventIntent> event_intents;
+
// Return a multi-line indented string representation, for logging.
std::string ToString() const;
@@ -100,6 +105,16 @@ std::string AXTreeUpdateBase<AXNodeData, AXTreeData>::ToString() const {
result += "AXTreeUpdate: root id " + base::NumberToString(root_id) + "\n";
}
+ if (event_from != ax::mojom::EventFrom::kNone)
+ result += "event_from=" + std::string(ui::ToString(event_from)) + "\n";
+
+ if (!event_intents.empty()) {
+ result += "event_intents=[\n";
+ for (const auto& event_intent : event_intents)
+ result += " " + event_intent.ToString() + "\n";
+ result += "]\n";
+ }
+
// The challenge here is that we want to indent the nodes being updated
// so that parent/child relationships are clear, but we don't have access
// to the rest of the tree for context, so we have to try to show the