| 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 24 matching lines...) Expand all Loading... |
| 35 // is mostly to implement support for walking the accessibility tree. | 35 // is mostly to implement support for walking the accessibility tree. |
| 36 virtual const AXNodeData& GetData() = 0; | 36 virtual const AXNodeData& GetData() = 0; |
| 37 | 37 |
| 38 // Get the window the node is contained in. | 38 // Get the window the node is contained in. |
| 39 virtual gfx::NativeWindow GetTopLevelWidget() = 0; | 39 virtual gfx::NativeWindow GetTopLevelWidget() = 0; |
| 40 | 40 |
| 41 // Get the parent of the node, which may be an AXPlatformNode or it may | 41 // Get the parent of the node, which may be an AXPlatformNode or it may |
| 42 // be a native accessible object implemented by another class. | 42 // be a native accessible object implemented by another class. |
| 43 virtual gfx::NativeViewAccessible GetParent() = 0; | 43 virtual gfx::NativeViewAccessible GetParent() = 0; |
| 44 | 44 |
| 45 // Get the number of children of this node. | 45 // Get the number of children of this node, excluding ignored children. |
| 46 virtual int GetChildCount() = 0; | 46 virtual int GetChildCount() = 0; |
| 47 | 47 |
| 48 // Get the child of a node given a 0-based index. | 48 // Get the child of a node given a 0-based index, excluding ignored children. |
| 49 virtual gfx::NativeViewAccessible ChildAtIndex(int index) = 0; | 49 virtual gfx::NativeViewAccessible ChildAtIndex(int index) = 0; |
| 50 | 50 |
| 51 // Get the offset to convert local coordinates to screen global coordinates. | 51 // Get the offset to convert local coordinates to screen global coordinates. |
| 52 virtual gfx::Vector2d GetGlobalCoordinateOffset() = 0; | 52 virtual gfx::Vector2d GetGlobalCoordinateOffset() = 0; |
| 53 | 53 |
| 54 // Do a *synchronous* hit test of the given location in global screen | 54 // Do a *synchronous* hit test of the given location in global screen |
| 55 // coordinates, and the node within this node's subtree (inclusive) that's | 55 // coordinates, and the node within this node's subtree (inclusive) that's |
| 56 // hit, if any. | 56 // hit, if any. |
| 57 // | 57 // |
| 58 // If the result is anything other than this object or NULL, it will be | 58 // If the result is anything other than this object or NULL, it will be |
| 59 // hit tested again recursively - that allows hit testing to work across | 59 // hit tested again recursively - that allows hit testing to work across |
| 60 // implementation classes. It's okay to take advantage of this and return | 60 // implementation classes. It's okay to take advantage of this and return |
| 61 // only an immediate child and not the deepest descendant. | 61 // only an immediate child and not the deepest descendant. |
| 62 // | 62 // |
| 63 // This function is mainly used by accessibility debugging software. | 63 // This function is mainly used by accessibility debugging software. |
| 64 // Platforms with touch accessibility use a different asynchronous interface. | 64 // Platforms with touch accessibility use a different asynchronous interface. |
| 65 virtual gfx::NativeViewAccessible HitTestSync(int x, int y) = 0; | 65 virtual gfx::NativeViewAccessible HitTestSync(int x, int y) = 0; |
| 66 | 66 |
| 67 // Return the node within this node's subtree (inclusive) that currently | 67 // Return the node within this node's subtree (inclusive) that currently |
| 68 // has focus. | 68 // has focus. |
| 69 virtual gfx::NativeViewAccessible GetFocus() = 0; | 69 virtual gfx::NativeViewAccessible GetFocus() = 0; |
| 70 | 70 |
| 71 // Whether this element should be ignored by the accessibility client. |
| 72 virtual bool IsIgnored() = 0; |
| 73 |
| 71 // | 74 // |
| 72 // Events. | 75 // Events. |
| 73 // | 76 // |
| 74 | 77 |
| 75 // Return the platform-native GUI object that should be used as a target | 78 // Return the platform-native GUI object that should be used as a target |
| 76 // for accessibility events. | 79 // for accessibility events. |
| 77 virtual gfx::AcceleratedWidget GetTargetForNativeAccessibilityEvent() = 0; | 80 virtual gfx::AcceleratedWidget GetTargetForNativeAccessibilityEvent() = 0; |
| 78 | 81 |
| 79 // | 82 // |
| 80 // Actions. | 83 // Actions. |
| 81 // | 84 // |
| 82 | 85 |
| 83 // Perform the default action, e.g. click a button, follow a link, or | 86 // Perform the default action, e.g. click a button, follow a link, or |
| 84 // toggle a checkbox. | 87 // toggle a checkbox. |
| 85 virtual void DoDefaultAction() = 0; | 88 virtual void DoDefaultAction() = 0; |
| 86 | 89 |
| 87 // Change the value of a control, such as the text content of a text field. | 90 // Change the value of a control, such as the text content of a text field. |
| 88 virtual bool SetStringValue(const base::string16& new_value) = 0; | 91 virtual bool SetStringValue(const base::string16& new_value) = 0; |
| 89 | 92 |
| 90 // Whether the string value is settable. | 93 // Whether the string value is settable. |
| 91 virtual bool CanSetStringValue() = 0; | 94 virtual bool CanSetStringValue() = 0; |
| 92 }; | 95 }; |
| 93 | 96 |
| 94 } // namespace ui | 97 } // namespace ui |
| 95 | 98 |
| 96 #endif // UI_ACCESSIBILITY_PLATFORM_AX_PLATFORM_NODE_DELEGATE_H_ | 99 #endif // UI_ACCESSIBILITY_PLATFORM_AX_PLATFORM_NODE_DELEGATE_H_ |
| OLD | NEW |