Chromium Code Reviews| Index: ui/accessibility/ax_range.h |
| diff --git a/ui/accessibility/ax_range.h b/ui/accessibility/ax_range.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..e7903af4abdb4e9ed55cca7ccc994cc5f94c5916 |
| --- /dev/null |
| +++ b/ui/accessibility/ax_range.h |
| @@ -0,0 +1,33 @@ |
| +// Copyright 2016 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef UI_ACCESSIBILITY_AX_RANGE_H_ |
| +#define UI_ACCESSIBILITY_AX_RANGE_H_ |
| + |
| +namespace ui { |
| + |
| +// A range of ax positions. |
| +template <class AXPositionType> |
| +struct AXRange { |
|
dmazzoni
2016/10/12 20:45:41
I suggest you delete it from this change since you
|
| + AXRange() |
| + : anchor(AXPositionType::CreateNullPosition()), |
| + focus(AXPositionType::CreateNullPosition()) {} |
| + |
| + AXRange(AXPositionType* anchor, AXPositionType* focus) |
| + : anchor(anchor), focus(focus) {} |
| + |
| + virtual ~AXRange() {} |
| + |
| + bool IsNull() const { |
| + return !anchor || !focus || anchor->IsNullPosition() || |
| + focus->IsNullPosition(); |
| + } |
| + |
| + AXPositionType* anchor; |
| + AXPositionType* focus; |
| +}; |
| + |
| +} // namespace ui |
| + |
| +#endif // UI_ACCESSIBILITY_AX_RANGE_H_ |