#include "ui/accessibility/platform/automation/automation_ax_tree_wrapper.h"
#include <map>
#include <vector>
#include "base/containers/contains.h"
#include "base/no_destructor.h"
#include "base/trace_event/common/trace_event_common.h"
#include "base/trace_event/trace_event.h"
#include "components/crash/core/common/crash_key.h"
#include "ui/accessibility/ax_event.h"
#include "ui/accessibility/ax_language_detection.h"
#include "ui/accessibility/ax_node_position.h"
#include "ui/accessibility/ax_selection.h"
#include "ui/accessibility/platform/automation/automation_api_util.h"
#include "ui/accessibility/platform/automation/automation_tree_manager_owner.h"
namespace ui {
struct AppNodeInfo { … };
std::map<std::string, std::pair<AXTreeID, int32_t>>&
GetAppIDToParentTreeNodeMap() { … }
std::map<std::string, std::vector<AppNodeInfo>>& GetAppIDToTreeNodeMap() { … }
AutomationAXTreeWrapper::AutomationAXTreeWrapper(
AutomationTreeManagerOwner* owner)
: … { … }
AutomationAXTreeWrapper::~AutomationAXTreeWrapper() { … }
AutomationAXTreeWrapper* AutomationAXTreeWrapper::GetParentOfTreeId(
AXTreeID tree_id) { … }
bool AutomationAXTreeWrapper::OnAccessibilityEvents(
const AXTreeID& tree_id,
const std::vector<AXTreeUpdate>& updates,
const std::vector<AXEvent>& events,
gfx::Point mouse_location) { … }
bool AutomationAXTreeWrapper::IsDesktopTree() const { … }
bool AutomationAXTreeWrapper::HasDeviceScaleFactor() const { … }
bool AutomationAXTreeWrapper::IsInFocusChain(int32_t node_id) { … }
AXSelection AutomationAXTreeWrapper::GetUnignoredSelection() { … }
AXNode* AutomationAXTreeWrapper::GetUnignoredNodeFromId(int32_t id) { … }
void AutomationAXTreeWrapper::SetAccessibilityFocus(int32_t node_id) { … }
AXNode* AutomationAXTreeWrapper::GetAccessibilityFocusedNode() { … }
AutomationAXTreeWrapper* AutomationAXTreeWrapper::GetParentTree() { … }
AutomationAXTreeWrapper*
AutomationAXTreeWrapper::GetTreeWrapperWithUnignoredRoot() { … }
AutomationAXTreeWrapper* AutomationAXTreeWrapper::GetParentTreeFromAnyAppID() { … }
void AutomationAXTreeWrapper::EventListenerAdded(
const std::tuple<ax::mojom::Event, AXEventGenerator::Event>& event_type,
AXNode* node) { … }
void AutomationAXTreeWrapper::EventListenerRemoved(
const std::tuple<ax::mojom::Event, AXEventGenerator::Event>& event_type,
AXNode* node) { … }
bool AutomationAXTreeWrapper::HasEventListener(
const std::tuple<ax::mojom::Event, AXEventGenerator::Event>& event_type,
AXNode* node) { … }
size_t AutomationAXTreeWrapper::EventListenerCount() const { … }
std::map<AXTreeID, AutomationAXTreeWrapper*>&
AutomationAXTreeWrapper::GetChildTreeIDReverseMap() { … }
AXNode* AutomationAXTreeWrapper::GetParentTreeNodeForAppID(
const std::string& app_id,
const AutomationTreeManagerOwner* owner) { … }
AutomationAXTreeWrapper* AutomationAXTreeWrapper::GetParentTreeWrapperForAppID(
const std::string& app_id,
const AutomationTreeManagerOwner* owner) { … }
std::vector<AXNode*> AutomationAXTreeWrapper::GetChildTreeNodesForAppID(
const std::string& app_id,
const AutomationTreeManagerOwner* owner) { … }
void AutomationAXTreeWrapper::OnNodeDataChanged(
AXTree* tree,
const AXNodeData& old_node_data,
const AXNodeData& new_node_data) { … }
void AutomationAXTreeWrapper::OnStringAttributeChanged(
AXTree* tree,
AXNode* node,
ax::mojom::StringAttribute attr,
const std::string& old_value,
const std::string& new_value) { … }
void AutomationAXTreeWrapper::OnNodeWillBeDeleted(AXTree* tree, AXNode* node) { … }
void AutomationAXTreeWrapper::OnNodeCreated(AXTree* tree, AXNode* node) { … }
void AutomationAXTreeWrapper::OnAtomicUpdateFinished(
AXTree* tree,
bool root_changed,
const std::vector<AXTreeObserver::Change>& changes) { … }
void AutomationAXTreeWrapper::OnIgnoredChanged(AXTree* tree,
AXNode* node,
bool is_ignored_new_value) { … }
bool AutomationAXTreeWrapper::IsTreeIgnored() { … }
AXNode* AutomationAXTreeWrapper::GetNodeFromTree(const AXTreeID& tree_id,
const AXNodeID node_id) const { … }
AXTreeID AutomationAXTreeWrapper::GetParentTreeID() const { … }
AXNode* AutomationAXTreeWrapper::GetParentNodeFromParentTree() const { … }
}