| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_DATA_H_ | 5 #ifndef UI_ACCESSIBILITY_AX_TREE_DATA_H_ |
| 6 #define UI_ACCESSIBILITY_AX_TREE_DATA_H_ | 6 #define UI_ACCESSIBILITY_AX_TREE_DATA_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 | 31 |
| 32 // This is a simple serializable struct. All member variables should be | 32 // This is a simple serializable struct. All member variables should be |
| 33 // public and copyable. | 33 // public and copyable. |
| 34 | 34 |
| 35 // The globally unique ID of this accessibility tree. | 35 // The globally unique ID of this accessibility tree. |
| 36 int32_t tree_id; | 36 int32_t tree_id; |
| 37 | 37 |
| 38 // The ID of the accessibility tree that this tree is contained in, if any. | 38 // The ID of the accessibility tree that this tree is contained in, if any. |
| 39 int32_t parent_tree_id; | 39 int32_t parent_tree_id; |
| 40 | 40 |
| 41 // The ID of the accessibility tree that has focus. This is typically set |
| 42 // on the root frame in a frame tree. |
| 43 int32_t focused_tree_id; |
| 44 |
| 41 // Attributes specific to trees that are web frames. | 45 // Attributes specific to trees that are web frames. |
| 42 std::string url; | 46 std::string url; |
| 43 std::string title; | 47 std::string title; |
| 44 std::string mimetype; | 48 std::string mimetype; |
| 45 std::string doctype; | 49 std::string doctype; |
| 46 bool loaded; | 50 bool loaded; |
| 47 float loading_progress; | 51 float loading_progress; |
| 48 | 52 |
| 49 // The node with keyboard focus within this tree, if any, or -1 if no node | 53 // The node with keyboard focus within this tree, if any, or -1 if no node |
| 50 // in this tree has focus. | 54 // in this tree has focus. |
| 51 int32_t focus_id; | 55 int32_t focus_id; |
| 52 | 56 |
| 53 // The current text selection within this tree, if any, expressed as the | 57 // The current text selection within this tree, if any, expressed as the |
| 54 // node ID and character offset of the anchor (selection start) and focus | 58 // node ID and character offset of the anchor (selection start) and focus |
| 55 // (selection end). | 59 // (selection end). |
| 56 int32_t sel_anchor_object_id; | 60 int32_t sel_anchor_object_id; |
| 57 int32_t sel_anchor_offset; | 61 int32_t sel_anchor_offset; |
| 58 int32_t sel_focus_object_id; | 62 int32_t sel_focus_object_id; |
| 59 int32_t sel_focus_offset; | 63 int32_t sel_focus_offset; |
| 60 }; | 64 }; |
| 61 | 65 |
| 62 AX_EXPORT bool operator==(const AXTreeData& lhs, const AXTreeData& rhs); | 66 AX_EXPORT bool operator==(const AXTreeData& lhs, const AXTreeData& rhs); |
| 63 AX_EXPORT bool operator!=(const AXTreeData& lhs, const AXTreeData& rhs); | 67 AX_EXPORT bool operator!=(const AXTreeData& lhs, const AXTreeData& rhs); |
| 64 | 68 |
| 65 } // namespace ui | 69 } // namespace ui |
| 66 | 70 |
| 67 #endif // UI_ACCESSIBILITY_AX_TREE_DATA_H_ | 71 #endif // UI_ACCESSIBILITY_AX_TREE_DATA_H_ |
| OLD | NEW |