OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef UI_ACCESSIBILITY_AX_POSITION_H_ | |
dmazzoni
2016/08/10 20:45:52
Looks cool but doesn't belong in this change?
| |
6 #define UI_ACCESSIBILITY_AX_POSITION_H_ | |
7 | |
8 #include "ui/accessibility/ax_node.h" | |
9 | |
10 namespace ui { | |
11 | |
12 // A position in the |AXTree|. | |
13 class AX_EXPORT AXPosition { | |
14 public: | |
15 AXPosition(); | |
16 AXPosition(AXNode* anchor, int offset); | |
17 virtual ~AXPosition(); | |
18 | |
19 static AXPosition* CreateNullPosition(); | |
20 | |
21 AXNode* get_anchor() const { return anchor_; } | |
22 int get_offset() const { return offset_; } | |
23 | |
24 bool IsNull() const; | |
25 AXPosition ToLeafEquivalent() const; | |
26 AXPosition GetCorrespondingPositionInParent(const AXNode& parent) const; | |
27 | |
28 private: | |
29 AXNode* anchor_; | |
30 int offset_; | |
31 }; | |
32 | |
33 } // namespace ui | |
34 | |
35 #endif // UI_ACCESSIBILITY_AX_POSITION_H_ | |
OLD | NEW |