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

Unified Diff: ui/accessibility/ax_range.h

Issue 2271893002: Creates AXPosition to uniquely identify a position in the accessibility tree (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Re-wrote implementation to include tree_id and platform specific AXPosition. Created 4 years, 2 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 side-by-side diff with in-line comments
Download patch
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..28f272e054141cd1c890608981722d1a249f474a
--- /dev/null
+++ b/ui/accessibility/ax_range.h
@@ -0,0 +1,32 @@
+// 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_
+
+#include "ui/accessibility/ax_position.h"
+
+namespace ui {
+
+// A range of ax positions.
+struct AX_EXPORT AXRange {
+ AXRange() : anchor(AXPosition::CreateNullPosition()), focus(AXPosition::CreateNullPosition()) {
+ }
+
+ AXRange(AXPosition anchor, AXPosition focus)
+ : anchor(anchor), focus(focus) {
+ }
+
+ virtual ~AXRange() {
+ }
+
+ bool IsNull() const { return anchor.IsNullPosition() || focus.IsNullPosition(); }
+
+ AXPosition anchor;
+ AXPosition focus;
+};
+
+} // namespace ui
+
+#endif // UI_ACCESSIBILITY_AX_RANGE_H_

Powered by Google App Engine
This is Rietveld 408576698