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

Side by Side Diff: public/web/WebAXTypes.h

Issue 22331005: Clean up accessibility enums for use in Chromium. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Update failing tests, add one missing role Created 7 years, 4 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
(Empty)
1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are
6 * met:
7 *
8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above
11 * copyright notice, this list of conditions and the following disclaimer
12 * in the documentation and/or other materials provided with the
13 * distribution.
14 * * Neither the name of Google Inc. nor the names of its
15 * contributors may be used to endorse or promote products derived from
16 * this software without specific prior written permission.
17 *
18 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 */
30
31 #ifndef WebAXTypes_h
32 #define WebAXTypes_h
33
34 namespace WebKit {
35
36 class WebAXTypes {
jamesr 2013/08/21 02:22:52 why are the enums inside a class? I think it'd be
dmazzoni 2013/08/21 03:07:58 It's more convenient to use within Chromium becaus
37 public:
38 // Accessibility events sent from Blink to the embedder.
39 // These values must match WebCore::AXObjectCache::AXNotification values.
40 // Enforced in AssertMatchingEnums.cpp.
41 enum Event {
42 ActiveDescendantChanged,
jamesr 2013/08/21 02:22:52 this doesn't follow the blink public API enum conv
dmazzoni 2013/08/21 03:07:58 It's consistent with all of these, and a dozen mor
43 Alert,
44 AriaAttributeChanged,
45 AutocorrectionOccured,
46 Blur,
47 CheckedStateChanged,
48 ChildrenChanged,
49 Focus,
50 Hide,
51 InvalidStatusChanged,
52 LayoutComplete,
53 LiveRegionChanged,
54 LoadComplete,
55 LocationChanged,
56 MenuListItemSelected,
57 MenuListValueChanged,
58 RowCollapsed,
59 RowCountChanged,
60 RowExpanded,
61 ScrolledToAnchor,
62 SelectedChildrenChanged,
63 SelectedTextChanged,
64 Show,
65 TextChanged,
66 TextInserted,
67 TextRemoved,
68 ValueChanged,
69 };
70
71 // Accessibility roles.
72 // These values must match WebCore::AccessibilityRole values.
73 // Enforced in AssertMatchingEnums.cpp.
74 enum Role {
75 AlertDialogRole = 1,
76 AlertRole,
77 AnnotationRole,
78 ApplicationRole,
79 ArticleRole,
80 BannerRole,
81 BrowserRole,
82 BusyIndicatorRole,
83 ButtonRole,
84 CanvasRole,
85 CellRole,
86 CheckBoxRole,
87 ColorWellRole,
88 ColumnHeaderRole,
89 ColumnRole,
90 ComboBoxRole,
91 ComplementaryRole,
92 ContentInfoRole,
93 DefinitionRole,
94 DescriptionListDetailRole,
95 DescriptionListTermRole,
96 DialogRole,
97 DirectoryRole,
98 DisclosureTriangleRole,
99 DivRole,
100 DocumentRole,
101 DrawerRole,
102 EditableTextRole,
103 FooterRole,
104 FormRole,
105 GridRole,
106 GroupRole,
107 GrowAreaRole,
108 HeadingRole,
109 HelpTagRole,
110 HorizontalRuleRole,
111 IgnoredRole,
112 ImageMapLinkRole,
113 ImageMapRole,
114 ImageRole,
115 IncrementorRole,
116 LabelRole,
117 LegendRole,
118 LinkRole,
119 ListBoxOptionRole,
120 ListBoxRole,
121 ListItemRole,
122 ListMarkerRole,
123 ListRole,
124 LogRole,
125 MainRole,
126 MarqueeRole,
127 MathElementRole,
128 MathRole,
129 MatteRole,
130 MenuBarRole,
131 MenuButtonRole,
132 MenuItemRole,
133 MenuListOptionRole,
134 MenuListPopupRole,
135 MenuRole,
136 NavigationRole,
137 NoteRole,
138 OutlineRole,
139 ParagraphRole,
140 PopUpButtonRole,
141 PresentationalRole,
142 ProgressIndicatorRole,
143 RadioButtonRole,
144 RadioGroupRole,
145 RegionRole,
146 RootWebAreaRole,
147 RowHeaderRole,
148 RowRole,
149 RulerMarkerRole,
150 RulerRole,
151 SVGRootRole,
152 ScrollAreaRole,
153 ScrollBarRole,
154 SeamlessWebAreaRole,
155 SearchRole,
156 SheetRole,
157 SliderRole,
158 SliderThumbRole,
159 SpinButtonPartRole,
160 SpinButtonRole,
161 SplitGroupRole,
162 SplitterRole,
163 StaticTextRole,
164 StatusRole,
165 SystemWideRole,
166 TabGroupRole,
167 TabListRole,
168 TabPanelRole,
169 TabRole,
170 TableHeaderContainerRole,
171 TableRole,
172 TextAreaRole,
173 TextFieldRole,
174 TimerRole,
175 ToggleButtonRole,
176 ToolbarRole,
177 TreeGridRole,
178 TreeItemRole,
179 TreeRole,
180 UnknownRole,
181 UserInterfaceTooltipRole,
182 ValueIndicatorRole,
183 WebAreaRole,
184 WindowRole,
185 };
186
187 // Accessibility states, used as a bitmask.
188 enum State {
189 BusyState,
190 CheckedState,
191 CollapsedState,
192 EnabledState,
193 ExpandedState,
194 FocusableState,
195 FocusedState,
196 HaspopupState,
197 HoveredState,
198 IndeterminateState,
199 InvisibleState,
200 LinkedState,
201 MultiselectableState,
202 OffscreenState,
203 PressedState,
204 ProtectedState,
205 ReadonlyState,
206 RequiredState,
207 SelectableState,
208 SelectedState,
209 VerticalState,
210 VisitedState,
211 };
212 };
213
214 } // namespace WebKit
215
216 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698