OLD | NEW |
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_DELEGATE_H_ | 5 #ifndef UI_ACCESSIBILITY_PLATFORM_AX_PLATFORM_NODE_DELEGATE_H_ |
6 #define UI_ACCESSIBILITY_PLATFORM_AX_PLATFORM_NODE_DELEGATE_H_ | 6 #define UI_ACCESSIBILITY_PLATFORM_AX_PLATFORM_NODE_DELEGATE_H_ |
7 | 7 |
8 #include "ui/accessibility/ax_enums.h" | 8 #include "ui/accessibility/ax_enums.h" |
9 #include "ui/accessibility/ax_export.h" | 9 #include "ui/accessibility/ax_export.h" |
10 #include "ui/gfx/geometry/vector2d.h" | 10 #include "ui/gfx/geometry/vector2d.h" |
(...skipping 16 matching lines...) Expand all Loading... |
27 // to provide accessibility. That's why GetParent, ChildAtIndex, HitTestSync, | 27 // to provide accessibility. That's why GetParent, ChildAtIndex, HitTestSync, |
28 // and GetFocus all return a gfx::NativeViewAccessible - so you can return a | 28 // and GetFocus all return a gfx::NativeViewAccessible - so you can return a |
29 // native accessible if necessary, and AXPlatformNode::GetNativeViewAccessible | 29 // native accessible if necessary, and AXPlatformNode::GetNativeViewAccessible |
30 // otherwise. | 30 // otherwise. |
31 class AX_EXPORT AXPlatformNodeDelegate { | 31 class AX_EXPORT AXPlatformNodeDelegate { |
32 public: | 32 public: |
33 // Get the accessibility data that should be exposed for this node. | 33 // Get the accessibility data that should be exposed for this node. |
34 // Virtually all of the information is obtained from this structure | 34 // Virtually all of the information is obtained from this structure |
35 // (role, state, name, cursor position, etc.) - the rest of this interface | 35 // (role, state, name, cursor position, etc.) - the rest of this interface |
36 // is mostly to implement support for walking the accessibility tree. | 36 // is mostly to implement support for walking the accessibility tree. |
37 virtual const AXNodeData& GetData() = 0; | 37 virtual const AXNodeData& GetData() const = 0; |
38 | 38 |
39 // Get the window the node is contained in. | 39 // Get the window the node is contained in. |
40 virtual gfx::NativeWindow GetTopLevelWidget() = 0; | 40 virtual gfx::NativeWindow GetTopLevelWidget() = 0; |
41 | 41 |
42 // Get the parent of the node, which may be an AXPlatformNode or it may | 42 // Get the parent of the node, which may be an AXPlatformNode or it may |
43 // be a native accessible object implemented by another class. | 43 // be a native accessible object implemented by another class. |
44 virtual gfx::NativeViewAccessible GetParent() = 0; | 44 virtual gfx::NativeViewAccessible GetParent() = 0; |
45 | 45 |
46 // Get the number of children of this node. | 46 // Get the number of children of this node. |
47 virtual int GetChildCount() = 0; | 47 virtual int GetChildCount() = 0; |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 virtual bool AccessibilityPerformAction(const ui::AXActionData& data) = 0; | 86 virtual bool AccessibilityPerformAction(const ui::AXActionData& data) = 0; |
87 | 87 |
88 // Perform the default action, e.g. click a button, follow a link, or | 88 // Perform the default action, e.g. click a button, follow a link, or |
89 // toggle a checkbox. | 89 // toggle a checkbox. |
90 virtual void DoDefaultAction() = 0; | 90 virtual void DoDefaultAction() = 0; |
91 }; | 91 }; |
92 | 92 |
93 } // namespace ui | 93 } // namespace ui |
94 | 94 |
95 #endif // UI_ACCESSIBILITY_PLATFORM_AX_PLATFORM_NODE_DELEGATE_H_ | 95 #endif // UI_ACCESSIBILITY_PLATFORM_AX_PLATFORM_NODE_DELEGATE_H_ |
OLD | NEW |