#ifndef UI_ACCESSIBILITY_PLATFORM_AX_PLATFORM_TREE_MANAGER_H_
#define UI_ACCESSIBILITY_PLATFORM_AX_PLATFORM_TREE_MANAGER_H_
#include "base/component_export.h"
#include "base/memory/weak_ptr.h"
#include "ui/accessibility/ax_node.h"
#include "ui/accessibility/ax_tree_manager.h"
namespace ui {
class AXPlatformNode;
class AXPlatformNodeDelegate;
class COMPONENT_EXPORT(AX_PLATFORM) AXPlatformTreeManager
: public AXTreeManager {
public:
explicit AXPlatformTreeManager(std::unique_ptr<AXTree> tree);
AXPlatformTreeManager(const AXPlatformTreeManager&) = delete;
AXPlatformTreeManager& operator=(const AXPlatformTreeManager&) = delete;
~AXPlatformTreeManager() override;
virtual AXPlatformNode* GetPlatformNodeFromTree(AXNodeID node_id) const = 0;
virtual AXPlatformNode* GetPlatformNodeFromTree(const AXNode& node) const = 0;
virtual AXPlatformNodeDelegate* RootDelegate() const = 0;
base::WeakPtr<AXPlatformTreeManager> GetWeakPtr() {
return weak_ptr_factory_.GetWeakPtr();
}
virtual void FireSentinelEventForTesting();
private:
base::WeakPtrFactory<AXPlatformTreeManager> weak_ptr_factory_{this};
};
}
#endif