Flutter Engine
The Flutter Engine
Public Member Functions | List of all members
ui::TestAXTreeManager Class Reference

#include <test_ax_tree_manager.h>

Inheritance diagram for ui::TestAXTreeManager:
ui::AXTreeManager ui::AXPlatformNodeTest ui::AXPlatformNodeMacTest ui::AXPlatformNodeWinTest ui::AXFragmentRootTest ui::AXPlatformNodeTextProviderTest ui::AXPlatformNodeTextRangeProviderTest

Public Member Functions

 TestAXTreeManager ()
 
 TestAXTreeManager (std::unique_ptr< AXTree > tree)
 
virtual ~TestAXTreeManager ()
 
 TestAXTreeManager (const TestAXTreeManager &manager)=delete
 
TestAXTreeManageroperator= (const TestAXTreeManager &manager)=delete
 
void DestroyTree ()
 
AXTreeGetTree () const
 
void SetTree (std::unique_ptr< AXTree > tree)
 
AXNodeGetNodeFromTree (const AXTreeID tree_id, const AXNode::AXID node_id) const override
 
AXNodeGetNodeFromTree (const AXNode::AXID node_id) const override
 
AXTreeID GetTreeID () const override
 
AXTreeID GetParentTreeID () const override
 
AXNodeGetRootAsAXNode () const override
 
AXNodeGetParentNodeFromParentTreeAsAXNode () const override
 
- Public Member Functions inherited from ui::AXTreeManager
virtual ~AXTreeManager ()=default
 
virtual AXNodeGetNodeFromTree (const AXTreeID tree_id, const AXNode::AXID node_id) const =0
 
virtual AXNodeGetNodeFromTree (const AXNode::AXID node_id) const =0
 
virtual AXTreeID GetTreeID () const =0
 
virtual AXTreeID GetParentTreeID () const =0
 
virtual AXNodeGetRootAsAXNode () const =0
 
virtual AXNodeGetParentNodeFromParentTreeAsAXNode () const =0
 
virtual AXTreeGetTree () const =0
 

Detailed Description

Definition at line 22 of file test_ax_tree_manager.h.

Constructor & Destructor Documentation

◆ TestAXTreeManager() [1/3]

ui::TestAXTreeManager::TestAXTreeManager ( )
default

◆ TestAXTreeManager() [2/3]

ui::TestAXTreeManager::TestAXTreeManager ( std::unique_ptr< AXTree tree)
explicit

Definition at line 15 of file test_ax_tree_manager.cc.

16 : tree_(std::move(tree)) {
18}
void AddTreeManager(AXTreeID tree_id, AXTreeManager *manager)
static AXTreeManagerMap & GetInstance()
AXTreeID GetTreeID() const override

◆ ~TestAXTreeManager()

ui::TestAXTreeManager::~TestAXTreeManager ( )
virtual

Definition at line 20 of file test_ax_tree_manager.cc.

20 {
21 if (tree_)
23}
void RemoveTreeManager(AXTreeID tree_id)

◆ TestAXTreeManager() [3/3]

ui::TestAXTreeManager::TestAXTreeManager ( const TestAXTreeManager manager)
delete

Member Function Documentation

◆ DestroyTree()

void ui::TestAXTreeManager::DestroyTree ( )

Definition at line 25 of file test_ax_tree_manager.cc.

25 {
26 if (!tree_)
27 return;
28
30 tree_.reset();
31}

◆ GetNodeFromTree() [1/2]

AXNode * ui::TestAXTreeManager::GetNodeFromTree ( const AXNode::AXID  node_id) const
overridevirtual

Implements ui::AXTreeManager.

Definition at line 55 of file test_ax_tree_manager.cc.

55 {
56 return tree_ ? tree_->GetFromId(node_id) : nullptr;
57}

◆ GetNodeFromTree() [2/2]

AXNode * ui::TestAXTreeManager::GetNodeFromTree ( const AXTreeID  tree_id,
const AXNode::AXID  node_id 
) const
overridevirtual

Implements ui::AXTreeManager.

Definition at line 49 of file test_ax_tree_manager.cc.

50 {
51 return (tree_ && GetTreeID() == tree_id) ? tree_->GetFromId(node_id)
52 : nullptr;
53}

◆ GetParentNodeFromParentTreeAsAXNode()

AXNode * ui::TestAXTreeManager::GetParentNodeFromParentTreeAsAXNode ( ) const
overridevirtual

Implements ui::AXTreeManager.

Definition at line 71 of file test_ax_tree_manager.cc.

71 {
72 return nullptr;
73}

◆ GetParentTreeID()

AXTreeID ui::TestAXTreeManager::GetParentTreeID ( ) const
overridevirtual

Implements ui::AXTreeManager.

Definition at line 63 of file test_ax_tree_manager.cc.

63 {
64 return AXTreeIDUnknown();
65}
const AXTreeID & AXTreeIDUnknown()
Definition: ax_tree_id.cc:103

◆ GetRootAsAXNode()

AXNode * ui::TestAXTreeManager::GetRootAsAXNode ( ) const
overridevirtual

Implements ui::AXTreeManager.

Definition at line 67 of file test_ax_tree_manager.cc.

67 {
68 return tree_ ? tree_->root() : nullptr;
69}

◆ GetTree()

AXTree * ui::TestAXTreeManager::GetTree ( ) const
virtual

Implements ui::AXTreeManager.

Definition at line 33 of file test_ax_tree_manager.cc.

33 {
34 if (!tree_) {
35 BASE_LOG() << "Did you forget to call SetTree?";
37 }
38 return tree_.get();
39}
#define BASE_UNREACHABLE()
Definition: logging.h:69
#define BASE_LOG()
Definition: logging.h:54

◆ GetTreeID()

AXTreeID ui::TestAXTreeManager::GetTreeID ( ) const
overridevirtual

Implements ui::AXTreeManager.

Definition at line 59 of file test_ax_tree_manager.cc.

59 {
60 return tree_ ? tree_->data().tree_id : AXTreeIDUnknown();
61}

◆ operator=()

TestAXTreeManager & ui::TestAXTreeManager::operator= ( const TestAXTreeManager manager)
delete

◆ SetTree()

void ui::TestAXTreeManager::SetTree ( std::unique_ptr< AXTree tree)

Definition at line 41 of file test_ax_tree_manager.cc.

41 {
42 if (tree_)
44
45 tree_ = std::move(tree);
47}

The documentation for this class was generated from the following files: