Commit f9206b0b authored by David Tseng's avatar David Tseng Committed by Commit Bot

Add event params to AXTreeUpdate::ToString

R=nektar@chromium.org

AX-Relnotes: n/a
Change-Id: I1d4d8e51f6998b76a8894991e05c5bfc05bb2b9f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2211057Reviewed-by: default avatarNektarios Paisios <nektar@chromium.org>
Commit-Queue: Nektarios Paisios <nektar@chromium.org>
Cr-Commit-Position: refs/heads/master@{#771650}
parent c5b29f08
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
#include <vector> #include <vector>
#include "base/strings/string_number_conversions.h" #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_enums.mojom.h"
#include "ui/accessibility/ax_event_intent.h" #include "ui/accessibility/ax_event_intent.h"
#include "ui/accessibility/ax_node_data.h" #include "ui/accessibility/ax_node_data.h"
...@@ -104,6 +105,16 @@ std::string AXTreeUpdateBase<AXNodeData, AXTreeData>::ToString() const { ...@@ -104,6 +105,16 @@ std::string AXTreeUpdateBase<AXNodeData, AXTreeData>::ToString() const {
result += "AXTreeUpdate: root id " + base::NumberToString(root_id) + "\n"; 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 // 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 // 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 // to the rest of the tree for context, so we have to try to show the
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment