Chromium Code Reviews| Index: public/web/WebAXTypes.h |
| diff --git a/public/web/WebAXTypes.h b/public/web/WebAXTypes.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..5f61601df683db031209f9a24c980fbc3a8fbc32 |
| --- /dev/null |
| +++ b/public/web/WebAXTypes.h |
| @@ -0,0 +1,216 @@ |
| +/* |
| + * Copyright (C) 2013 Google Inc. All rights reserved. |
| + * |
| + * Redistribution and use in source and binary forms, with or without |
| + * modification, are permitted provided that the following conditions are |
| + * met: |
| + * |
| + * * Redistributions of source code must retain the above copyright |
| + * notice, this list of conditions and the following disclaimer. |
| + * * Redistributions in binary form must reproduce the above |
| + * copyright notice, this list of conditions and the following disclaimer |
| + * in the documentation and/or other materials provided with the |
| + * distribution. |
| + * * Neither the name of Google Inc. nor the names of its |
| + * contributors may be used to endorse or promote products derived from |
| + * this software without specific prior written permission. |
| + * |
| + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
| + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
| + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |
| + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |
| + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
| + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
| + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
| + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
| + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| + */ |
| + |
| +#ifndef WebAXTypes_h |
| +#define WebAXTypes_h |
| + |
| +namespace WebKit { |
| + |
| +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
|
| +public: |
| + // Accessibility events sent from Blink to the embedder. |
| + // These values must match WebCore::AXObjectCache::AXNotification values. |
| + // Enforced in AssertMatchingEnums.cpp. |
| + enum Event { |
| + 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
|
| + Alert, |
| + AriaAttributeChanged, |
| + AutocorrectionOccured, |
| + Blur, |
| + CheckedStateChanged, |
| + ChildrenChanged, |
| + Focus, |
| + Hide, |
| + InvalidStatusChanged, |
| + LayoutComplete, |
| + LiveRegionChanged, |
| + LoadComplete, |
| + LocationChanged, |
| + MenuListItemSelected, |
| + MenuListValueChanged, |
| + RowCollapsed, |
| + RowCountChanged, |
| + RowExpanded, |
| + ScrolledToAnchor, |
| + SelectedChildrenChanged, |
| + SelectedTextChanged, |
| + Show, |
| + TextChanged, |
| + TextInserted, |
| + TextRemoved, |
| + ValueChanged, |
| + }; |
| + |
| + // Accessibility roles. |
| + // These values must match WebCore::AccessibilityRole values. |
| + // Enforced in AssertMatchingEnums.cpp. |
| + enum Role { |
| + AlertDialogRole = 1, |
| + AlertRole, |
| + AnnotationRole, |
| + ApplicationRole, |
| + ArticleRole, |
| + BannerRole, |
| + BrowserRole, |
| + BusyIndicatorRole, |
| + ButtonRole, |
| + CanvasRole, |
| + CellRole, |
| + CheckBoxRole, |
| + ColorWellRole, |
| + ColumnHeaderRole, |
| + ColumnRole, |
| + ComboBoxRole, |
| + ComplementaryRole, |
| + ContentInfoRole, |
| + DefinitionRole, |
| + DescriptionListDetailRole, |
| + DescriptionListTermRole, |
| + DialogRole, |
| + DirectoryRole, |
| + DisclosureTriangleRole, |
| + DivRole, |
| + DocumentRole, |
| + DrawerRole, |
| + EditableTextRole, |
| + FooterRole, |
| + FormRole, |
| + GridRole, |
| + GroupRole, |
| + GrowAreaRole, |
| + HeadingRole, |
| + HelpTagRole, |
| + HorizontalRuleRole, |
| + IgnoredRole, |
| + ImageMapLinkRole, |
| + ImageMapRole, |
| + ImageRole, |
| + IncrementorRole, |
| + LabelRole, |
| + LegendRole, |
| + LinkRole, |
| + ListBoxOptionRole, |
| + ListBoxRole, |
| + ListItemRole, |
| + ListMarkerRole, |
| + ListRole, |
| + LogRole, |
| + MainRole, |
| + MarqueeRole, |
| + MathElementRole, |
| + MathRole, |
| + MatteRole, |
| + MenuBarRole, |
| + MenuButtonRole, |
| + MenuItemRole, |
| + MenuListOptionRole, |
| + MenuListPopupRole, |
| + MenuRole, |
| + NavigationRole, |
| + NoteRole, |
| + OutlineRole, |
| + ParagraphRole, |
| + PopUpButtonRole, |
| + PresentationalRole, |
| + ProgressIndicatorRole, |
| + RadioButtonRole, |
| + RadioGroupRole, |
| + RegionRole, |
| + RootWebAreaRole, |
| + RowHeaderRole, |
| + RowRole, |
| + RulerMarkerRole, |
| + RulerRole, |
| + SVGRootRole, |
| + ScrollAreaRole, |
| + ScrollBarRole, |
| + SeamlessWebAreaRole, |
| + SearchRole, |
| + SheetRole, |
| + SliderRole, |
| + SliderThumbRole, |
| + SpinButtonPartRole, |
| + SpinButtonRole, |
| + SplitGroupRole, |
| + SplitterRole, |
| + StaticTextRole, |
| + StatusRole, |
| + SystemWideRole, |
| + TabGroupRole, |
| + TabListRole, |
| + TabPanelRole, |
| + TabRole, |
| + TableHeaderContainerRole, |
| + TableRole, |
| + TextAreaRole, |
| + TextFieldRole, |
| + TimerRole, |
| + ToggleButtonRole, |
| + ToolbarRole, |
| + TreeGridRole, |
| + TreeItemRole, |
| + TreeRole, |
| + UnknownRole, |
| + UserInterfaceTooltipRole, |
| + ValueIndicatorRole, |
| + WebAreaRole, |
| + WindowRole, |
| + }; |
| + |
| + // Accessibility states, used as a bitmask. |
| + enum State { |
| + BusyState, |
| + CheckedState, |
| + CollapsedState, |
| + EnabledState, |
| + ExpandedState, |
| + FocusableState, |
| + FocusedState, |
| + HaspopupState, |
| + HoveredState, |
| + IndeterminateState, |
| + InvisibleState, |
| + LinkedState, |
| + MultiselectableState, |
| + OffscreenState, |
| + PressedState, |
| + ProtectedState, |
| + ReadonlyState, |
| + RequiredState, |
| + SelectableState, |
| + SelectedState, |
| + VerticalState, |
| + VisitedState, |
| + }; |
| +}; |
| + |
| +} // namespace WebKit |
| + |
| +#endif |