| 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_NODE_H_ | 5 #ifndef UI_ACCESSIBILITY_AX_NODE_H_ |
| 6 #define UI_ACCESSIBILITY_AX_NODE_H_ | 6 #define UI_ACCESSIBILITY_AX_NODE_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 bool IsDescendantOf(AXNode* ancestor); | 70 bool IsDescendantOf(AXNode* ancestor); |
| 71 | 71 |
| 72 // Gets the text offsets where new lines start either from the node's data or | 72 // Gets the text offsets where new lines start either from the node's data or |
| 73 // by computing them and caching the result. | 73 // by computing them and caching the result. |
| 74 std::vector<int> GetOrComputeLineStartOffsets(); | 74 std::vector<int> GetOrComputeLineStartOffsets(); |
| 75 | 75 |
| 76 private: | 76 private: |
| 77 // Computes the text offset where each line starts by traversing all child | 77 // Computes the text offset where each line starts by traversing all child |
| 78 // leaf nodes. | 78 // leaf nodes. |
| 79 void ComputeLineStartOffsets(std::vector<int>* line_offsets, | 79 void ComputeLineStartOffsets(std::vector<int>* line_offsets, |
| 80 int* end_offset) const; | 80 int* start_offset) const; |
| 81 | 81 |
| 82 int index_in_parent_; | 82 int index_in_parent_; |
| 83 AXNode* parent_; | 83 AXNode* parent_; |
| 84 std::vector<AXNode*> children_; | 84 std::vector<AXNode*> children_; |
| 85 AXNodeData data_; | 85 AXNodeData data_; |
| 86 }; | 86 }; |
| 87 | 87 |
| 88 } // namespace ui | 88 } // namespace ui |
| 89 | 89 |
| 90 #endif // UI_ACCESSIBILITY_AX_NODE_H_ | 90 #endif // UI_ACCESSIBILITY_AX_NODE_H_ |
| OLD | NEW |