OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef UI_ACCESSIBILITY_AX_TREE_H_ | 5 #ifndef UI_ACCESSIBILITY_AX_TREE_H_ |
6 #define UI_ACCESSIBILITY_AX_TREE_H_ | 6 #define UI_ACCESSIBILITY_AX_TREE_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <set> | 10 #include <set> |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 AXBoolAttribute attr, | 78 AXBoolAttribute attr, |
79 bool new_value) {} | 79 bool new_value) {} |
80 virtual void OnIntListAttributeChanged( | 80 virtual void OnIntListAttributeChanged( |
81 AXTree* tree, | 81 AXTree* tree, |
82 AXNode* node, | 82 AXNode* node, |
83 AXIntListAttribute attr, | 83 AXIntListAttribute attr, |
84 const std::vector<int32_t>& old_value, | 84 const std::vector<int32_t>& old_value, |
85 const std::vector<int32_t>& new_value) {} | 85 const std::vector<int32_t>& new_value) {} |
86 | 86 |
87 // Called when tree data changes. | 87 // Called when tree data changes. |
88 virtual void OnTreeDataChanged(AXTree* tree) = 0; | 88 virtual void OnTreeDataChanged(AXTree* tree, |
89 | 89 const ui::AXTreeData& old_data, |
| 90 const ui::AXTreeData& new_data) = 0; |
90 // Called just before a node is deleted. Its id and data will be valid, | 91 // Called just before a node is deleted. Its id and data will be valid, |
91 // but its links to parents and children are invalid. This is called | 92 // but its links to parents and children are invalid. This is called |
92 // in the middle of an update, the tree may be in an invalid state! | 93 // in the middle of an update, the tree may be in an invalid state! |
93 virtual void OnNodeWillBeDeleted(AXTree* tree, AXNode* node) = 0; | 94 virtual void OnNodeWillBeDeleted(AXTree* tree, AXNode* node) = 0; |
94 | 95 |
95 // Same as OnNodeWillBeDeleted, but only called once for an entire subtree. | 96 // Same as OnNodeWillBeDeleted, but only called once for an entire subtree. |
96 // This is called in the middle of an update, the tree may be in an | 97 // This is called in the middle of an update, the tree may be in an |
97 // invalid state! | 98 // invalid state! |
98 virtual void OnSubtreeWillBeDeleted(AXTree* tree, AXNode* node) = 0; | 99 virtual void OnSubtreeWillBeDeleted(AXTree* tree, AXNode* node) = 0; |
99 | 100 |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
223 AXTreeDelegate* delegate_; | 224 AXTreeDelegate* delegate_; |
224 AXNode* root_; | 225 AXNode* root_; |
225 base::hash_map<int32_t, AXNode*> id_map_; | 226 base::hash_map<int32_t, AXNode*> id_map_; |
226 std::string error_; | 227 std::string error_; |
227 AXTreeData data_; | 228 AXTreeData data_; |
228 }; | 229 }; |
229 | 230 |
230 } // namespace ui | 231 } // namespace ui |
231 | 232 |
232 #endif // UI_ACCESSIBILITY_AX_TREE_H_ | 233 #endif // UI_ACCESSIBILITY_AX_TREE_H_ |
OLD | NEW |