Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(167)

Side by Side Diff: ui/accessibility/ax_tree.h

Issue 1716663002: Add a treeChange type to Automation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 virtual void OnSubtreeWillBeDeleted(AXTree* tree, AXNode* node) = 0; 55 virtual void OnSubtreeWillBeDeleted(AXTree* tree, AXNode* node) = 0;
56 56
57 // Called immediately after a new node is created. The tree may be in 57 // Called immediately after a new node is created. The tree may be in
58 // the middle of an update, don't walk the parents and children now. 58 // the middle of an update, don't walk the parents and children now.
59 virtual void OnNodeCreated(AXTree* tree, AXNode* node) = 0; 59 virtual void OnNodeCreated(AXTree* tree, AXNode* node) = 0;
60 60
61 // Called when a node changes its data or children. The tree may be in 61 // Called when a node changes its data or children. The tree may be in
62 // the middle of an update, don't walk the parents and children now. 62 // the middle of an update, don't walk the parents and children now.
63 virtual void OnNodeChanged(AXTree* tree, AXNode* node) = 0; 63 virtual void OnNodeChanged(AXTree* tree, AXNode* node) = 0;
64 64
65 enum ChangeType { 65 enum ChangeType { NODE_CREATED, SUBTREE_CREATED, NODE_CHANGED, TEXT_CHANGED };
66 NODE_CREATED,
67 SUBTREE_CREATED,
68 NODE_CHANGED
69 };
70 66
71 struct Change { 67 struct Change {
72 Change(AXNode* node, ChangeType type) { 68 Change(AXNode* node, ChangeType type) {
73 this->node = node; 69 this->node = node;
74 this->type = type; 70 this->type = type;
75 } 71 }
76 AXNode* node; 72 AXNode* node;
77 ChangeType type; 73 ChangeType type;
78 }; 74 };
79 75
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 AXTreeDelegate* delegate_; 155 AXTreeDelegate* delegate_;
160 AXNode* root_; 156 AXNode* root_;
161 base::hash_map<int32_t, AXNode*> id_map_; 157 base::hash_map<int32_t, AXNode*> id_map_;
162 std::string error_; 158 std::string error_;
163 AXTreeData data_; 159 AXTreeData data_;
164 }; 160 };
165 161
166 } // namespace ui 162 } // namespace ui
167 163
168 #endif // UI_ACCESSIBILITY_AX_TREE_H_ 164 #endif // UI_ACCESSIBILITY_AX_TREE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698