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

#include <ax_tree_manager_map.h>

Public Member Functions

 AXTreeManagerMap ()
 
 ~AXTreeManagerMap ()
 
void AddTreeManager (AXTreeID tree_id, AXTreeManager *manager)
 
void RemoveTreeManager (AXTreeID tree_id)
 
AXTreeManagerGetManager (AXTreeID tree_id)
 
AXTreeManagerGetManagerForChildTree (const AXNode &parent_node)
 

Static Public Member Functions

static AXTreeManagerMapGetInstance ()
 

Detailed Description

Definition at line 20 of file ax_tree_manager_map.h.

Constructor & Destructor Documentation

◆ AXTreeManagerMap()

ui::AXTreeManagerMap::AXTreeManagerMap ( )

Definition at line 13 of file ax_tree_manager_map.cc.

13{}

◆ ~AXTreeManagerMap()

ui::AXTreeManagerMap::~AXTreeManagerMap ( )

Definition at line 15 of file ax_tree_manager_map.cc.

15{}

Member Function Documentation

◆ AddTreeManager()

void ui::AXTreeManagerMap::AddTreeManager ( AXTreeID  tree_id,
AXTreeManager manager 
)

Definition at line 22 of file ax_tree_manager_map.cc.

23 {
24 if (tree_id != AXTreeIDUnknown())
25 map_[tree_id] = manager;
26}
it will be possible to load the file into Perfetto s trace viewer disable asset Prevents usage of any non test fonts unless they were explicitly Loaded via prefetched default font manager
Definition: switches.h:218
const AXTreeID & AXTreeIDUnknown()
Definition: ax_tree_id.cc:103

◆ GetInstance()

AXTreeManagerMap & ui::AXTreeManagerMap::GetInstance ( )
static

Definition at line 17 of file ax_tree_manager_map.cc.

17 {
19 return *instance;
20}
VkInstance instance
Definition: main.cc:48

◆ GetManager()

AXTreeManager * ui::AXTreeManagerMap::GetManager ( AXTreeID  tree_id)

Definition at line 33 of file ax_tree_manager_map.cc.

33 {
34 if (tree_id == AXTreeIDUnknown() || !base::Contains(map_, tree_id))
35 return nullptr;
36
37 return map_.at(tree_id);
38}
bool Contains(const Container &container, const Value &value)

◆ GetManagerForChildTree()

AXTreeManager * ui::AXTreeManagerMap::GetManagerForChildTree ( const AXNode parent_node)

Definition at line 40 of file ax_tree_manager_map.cc.

41 {
42 if (!parent_node.data().HasStringAttribute(
44 return nullptr;
45 }
46
47 AXTreeID child_tree_id =
48 AXTreeID::FromString(parent_node.data().GetStringAttribute(
50 AXTreeManager* child_tree_manager =
52
53 // Some platforms do not use AXTreeManagers, so child trees don't exist in
54 // the browser process.
55 if (!child_tree_manager)
56 return nullptr;
57
58 BASE_DCHECK(child_tree_manager->GetParentNodeFromParentTreeAsAXNode()->id() ==
59 parent_node.id());
60
61 return child_tree_manager;
62}
static AXTreeID FromString(const std::string &string)
Definition: ax_tree_id.cc:37
AXTreeManager * GetManager(AXTreeID tree_id)
static AXTreeManagerMap & GetInstance()
#define BASE_DCHECK(condition)
Definition: logging.h:63

◆ RemoveTreeManager()

void ui::AXTreeManagerMap::RemoveTreeManager ( AXTreeID  tree_id)

Definition at line 28 of file ax_tree_manager_map.cc.

28 {
29 if (tree_id != AXTreeIDUnknown())
30 map_.erase(tree_id);
31}

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