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_RANGE_H_ |
| 6 #define UI_ACCESSIBILITY_AX_RANGE_H_ |
| 7 |
| 8 #include "ui/accessibility/ax_position.h" |
| 9 |
| 10 namespace ui { |
| 11 |
| 12 // A range of ax positions. |
| 13 template <AXNodeType> |
| 14 struct AXRange { |
| 15 AXRange() |
| 16 : anchor(AXPosition<AXNodeType>::CreateNullPosition()), |
| 17 focus(AXPosition<AXNodeType>::CreateNullPosition()) {} |
| 18 |
| 19 AXRange(AXPosition<AXNodeType> anchor, AXPosition<AXNodeType> focus) |
| 20 : anchor(anchor), focus(focus) {} |
| 21 |
| 22 virtual ~AXRange() {} |
| 23 |
| 24 bool IsNull() const { |
| 25 return anchor.IsNullPosition() || focus.IsNullPosition(); |
| 26 } |
| 27 |
| 28 AXPosition<AXNodeType> anchor; |
| 29 AXPosition<AXNodeType> focus; |
| 30 }; |
| 31 |
| 32 } // namespace ui |
| 33 |
| 34 #endif // UI_ACCESSIBILITY_AX_RANGE_H_ |
OLD | NEW |