1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef CONTENT_RENDERER_ACCESSIBILITY_BLINK_AX_ENUM_CONVERSION_H_
6 #define CONTENT_RENDERER_ACCESSIBILITY_BLINK_AX_ENUM_CONVERSION_H_
8 #include "third_party/WebKit/public/web/WebAXObject.h"
9 #include "ui/accessibility/ax_enums.h"
13 // Convert a Blink WebAXRole to an AXRole defined in ui/accessibility.
14 ui::AXRole
AXRoleFromBlink(blink::WebAXRole role
);
16 // Convert a Blink WebAXEvent to an AXEvent defined in ui/accessibility.
17 ui::AXEvent
AXEventFromBlink(blink::WebAXEvent event
);
19 // Provides a conversion between the WebAXObject state
20 // accessors and a state bitmask stored in an AXNodeData.
21 // (Note that some rare states are sent as boolean attributes
22 // in AXNodeData instead.)
23 uint32
AXStateFromBlink(const blink::WebAXObject
& o
);
25 // Convert a Blink WebAXTextDirection to an AXTextDirection defined in
27 ui::AXTextDirection
AXTextDirectionFromBlink(
28 blink::WebAXTextDirection text_direction
);
30 ui::AXTextStyle
AXTextStyleFromBlink(blink::WebAXTextStyle text_style
);
32 // Convert a Blink WebAXInvalidState to an AXInvalidState defined in
34 ui::AXInvalidState
AXInvalidStateFromBlink(
35 blink::WebAXInvalidState invalid_state
);
37 // Convert a Blink WebAXSortDirection to an AXSortDirection defined in
39 ui::AXSortDirection
AXSortDirectionFromBlink(
40 blink::WebAXSortDirection sort_direction
);
42 } // namespace content
44 #endif // CONTENT_RENDERER_ACCESSIBILITY_BLINK_AX_ENUM_CONVERSION_H_