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

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

Issue 1550483002: Switch to standard integer types in ui/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@int-ui-events
Patch Set: Created 4 years, 12 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
« no previous file with comments | « ui/accessibility/ax_generated_tree_unittest.cc ('k') | ui/accessibility/ax_node.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_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>
9
8 #include <vector> 10 #include <vector>
9 11
10 #include "ui/accessibility/ax_node_data.h" 12 #include "ui/accessibility/ax_node_data.h"
11 13
12 namespace gfx { 14 namespace gfx {
13 class Rect; 15 class Rect;
14 } 16 }
15 17
16 namespace ui { 18 namespace ui {
17 19
18 // One node in an AXTree. 20 // One node in an AXTree.
19 class AX_EXPORT AXNode { 21 class AX_EXPORT AXNode {
20 public: 22 public:
21 // The constructor requires a parent, id, and index in parent, but 23 // The constructor requires a parent, id, and index in parent, but
22 // the data is not required. After initialization, only index_in_parent 24 // the data is not required. After initialization, only index_in_parent
23 // is allowed to change, the others are guaranteed to never change. 25 // is allowed to change, the others are guaranteed to never change.
24 AXNode(AXNode* parent, int32 id, int32 index_in_parent); 26 AXNode(AXNode* parent, int32_t id, int32_t index_in_parent);
25 virtual ~AXNode(); 27 virtual ~AXNode();
26 28
27 // Accessors. 29 // Accessors.
28 int32 id() const { return data_.id; } 30 int32_t id() const { return data_.id; }
29 AXNode* parent() const { return parent_; } 31 AXNode* parent() const { return parent_; }
30 int child_count() const { return static_cast<int>(children_.size()); } 32 int child_count() const { return static_cast<int>(children_.size()); }
31 const AXNodeData& data() const { return data_; } 33 const AXNodeData& data() const { return data_; }
32 const std::vector<AXNode*>& children() const { return children_; } 34 const std::vector<AXNode*>& children() const { return children_; }
33 int index_in_parent() const { return index_in_parent_; } 35 int index_in_parent() const { return index_in_parent_; }
34 36
35 // Get the child at the given index. 37 // Get the child at the given index.
36 AXNode* ChildAtIndex(int index) const { return children_[index]; } 38 AXNode* ChildAtIndex(int index) const { return children_[index]; }
37 39
38 // Set the node's accessibility data. This may be done during initial 40 // Set the node's accessibility data. This may be done during initial
(...skipping 25 matching lines...) Expand all
64 private: 66 private:
65 int index_in_parent_; 67 int index_in_parent_;
66 AXNode* parent_; 68 AXNode* parent_;
67 std::vector<AXNode*> children_; 69 std::vector<AXNode*> children_;
68 AXNodeData data_; 70 AXNodeData data_;
69 }; 71 };
70 72
71 } // namespace ui 73 } // namespace ui
72 74
73 #endif // UI_ACCESSIBILITY_AX_NODE_H_ 75 #endif // UI_ACCESSIBILITY_AX_NODE_H_
OLDNEW
« no previous file with comments | « ui/accessibility/ax_generated_tree_unittest.cc ('k') | ui/accessibility/ax_node.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698