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

Side by Side Diff: ui/accessibility/platform/ax_platform_node_base.h

Issue 2964313002: Converts accNavigate over to the AXPlatformNode code. (Closed)
Patch Set: are -> is Created 3 years, 5 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_PLATFORM_AX_PLATFORM_NODE_BASE_H_ 5 #ifndef UI_ACCESSIBILITY_PLATFORM_AX_PLATFORM_NODE_BASE_H_
6 #define UI_ACCESSIBILITY_PLATFORM_AX_PLATFORM_NODE_BASE_H_ 6 #define UI_ACCESSIBILITY_PLATFORM_AX_PLATFORM_NODE_BASE_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "ui/accessibility/ax_enums.h" 9 #include "ui/accessibility/ax_enums.h"
10 #include "ui/accessibility/platform/ax_platform_node.h" 10 #include "ui/accessibility/platform/ax_platform_node.h"
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 bool HasStringAttribute( 55 bool HasStringAttribute(
56 ui::AXStringAttribute attribute) const; 56 ui::AXStringAttribute attribute) const;
57 const std::string& GetStringAttribute(ui::AXStringAttribute attribute) const; 57 const std::string& GetStringAttribute(ui::AXStringAttribute attribute) const;
58 bool GetStringAttribute(ui::AXStringAttribute attribute, 58 bool GetStringAttribute(ui::AXStringAttribute attribute,
59 std::string* value) const; 59 std::string* value) const;
60 bool GetString16Attribute(ui::AXStringAttribute attribute, 60 bool GetString16Attribute(ui::AXStringAttribute attribute,
61 base::string16* value) const; 61 base::string16* value) const;
62 base::string16 GetString16Attribute( 62 base::string16 GetString16Attribute(
63 ui::AXStringAttribute attribute) const; 63 ui::AXStringAttribute attribute) const;
64 64
65 AXPlatformNodeDelegate* delegate_; // Weak. Owns this. 65 bool HasIntListAttribute(ui::AXIntListAttribute attribute) const;
66 const std::vector<int32_t>& GetIntListAttribute(
67 ui::AXIntListAttribute attribute) const;
68
69 bool GetIntListAttribute(ui::AXIntListAttribute attribute,
70 std::vector<int32_t>* value) const;
71
72 // Returns the table or ARIA grid if inside one.
73 AXPlatformNodeBase* GetTable() const;
74
75 // If inside a table or ARIA grid, returns the cell found at the given index.
76 // Indices are in row major order and each cell is counted once regardless of
77 // its span.
78 AXPlatformNodeBase* GetTableCell(int index) const;
79
80 // If inside a table or ARIA grid, returns the cell at the given row and
81 // column (0-based). Works correctly with cells that span multiple rows or
82 // columns.
83 AXPlatformNodeBase* GetTableCell(int row, int column) const;
84
85 // If inside a table or ARIA grid, returns the zero-based index of the cell.
86 // Indices are in row major order and each cell is counted once regardless of
87 // its span. Returns -1 if the cell is not found or if not inside a table.
88 int GetTableCellIndex() const;
89
90 // If inside a table or ARIA grid, returns the physical column number for the
91 // current cell. In contrast to logical columns, physical columns always start
92 // from 0 and have no gaps in their numbering. Logical columns can be set
93 // using aria-colindex.
94 int GetTableColumn() const;
95
96 // If inside a table or ARIA grid, returns the number of physical columns,
97 // otherwise returns 0.
98 int GetTableColumnCount() const;
99
100 // If inside a table or ARIA grid, returns the number of physical columns that
101 // this cell spans. If not a cell, returns 0.
102 int GetTableColumnSpan() const;
103
104 // If inside a table or ARIA grid, returns the physical row number for the
105 // current cell. In contrast to logical rows, physical rows always start from
106 // 0 and have no gaps in their numbering. Logical rows can be set using
107 // aria-rowindex.
108 int GetTableRow() const;
109
110 // If inside a table or ARIA grid, returns the number of physical rows,
111 // otherwise returns 0.
112 int GetTableRowCount() const;
113
114 // If inside a table or ARIA grid, returns the number of physical rows that
115 // this cell spans. If not a cell, returns 0.
116 int GetTableRowSpan() const;
117
118 //
119 // Delegate. This is a weak reference which owns |this|.
120 //
121 AXPlatformNodeDelegate* delegate_;
66 122
67 protected: 123 protected:
68 AXPlatformNodeBase(); 124 AXPlatformNodeBase();
69 ~AXPlatformNodeBase() override; 125 ~AXPlatformNodeBase() override;
70 126
71 bool IsTextOnlyObject() const; 127 bool IsTextOnlyObject() const;
72 bool IsNativeTextControl() const; 128 bool IsNativeTextControl() const;
73 bool IsSimpleTextControl() const; 129 bool IsSimpleTextControl() const;
74 bool IsRichTextControl(); 130 bool IsRichTextControl();
75 bool IsRangeValueSupported() const; 131 bool IsRangeValueSupported() const;
(...skipping 12 matching lines...) Expand all
88 // Sets the text selection in this object if possible. 144 // Sets the text selection in this object if possible.
89 bool SetTextSelection(int start_offset, int end_offset); 145 bool SetTextSelection(int start_offset, int end_offset);
90 146
91 private: 147 private:
92 DISALLOW_COPY_AND_ASSIGN(AXPlatformNodeBase); 148 DISALLOW_COPY_AND_ASSIGN(AXPlatformNodeBase);
93 }; 149 };
94 150
95 } // namespace ui 151 } // namespace ui
96 152
97 #endif // UI_ACCESSIBILITY_PLATFORM_AX_PLATFORM_NODE_BASE_H_ 153 #endif // UI_ACCESSIBILITY_PLATFORM_AX_PLATFORM_NODE_BASE_H_
OLDNEW
« no previous file with comments | « content/browser/accessibility/browser_accessibility_win.cc ('k') | ui/accessibility/platform/ax_platform_node_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698