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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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; |
48 | 48 |
49 // Get the child of a node given a 0-based index. | 49 // Get the child of a node given a 0-based index. |
50 virtual gfx::NativeViewAccessible ChildAtIndex(int index) = 0; | 50 virtual gfx::NativeViewAccessible ChildAtIndex(int index) = 0; |
51 | 51 |
52 // Get the offset to convert local coordinates to screen global coordinates. | 52 // Get the bounds of this node in screen coordinates. |
53 virtual gfx::Vector2d GetGlobalCoordinateOffset() = 0; | 53 virtual gfx::Rect GetScreenBoundsRect() const = 0; |
54 | 54 |
55 // Do a *synchronous* hit test of the given location in global screen | 55 // Do a *synchronous* hit test of the given location in global screen |
56 // coordinates, and the node within this node's subtree (inclusive) that's | 56 // coordinates, and the node within this node's subtree (inclusive) that's |
57 // hit, if any. | 57 // hit, if any. |
58 // | 58 // |
59 // If the result is anything other than this object or NULL, it will be | 59 // If the result is anything other than this object or NULL, it will be |
60 // hit tested again recursively - that allows hit testing to work across | 60 // hit tested again recursively - that allows hit testing to work across |
61 // implementation classes. It's okay to take advantage of this and return | 61 // implementation classes. It's okay to take advantage of this and return |
62 // only an immediate child and not the deepest descendant. | 62 // only an immediate child and not the deepest descendant. |
63 // | 63 // |
(...skipping 22 matching lines...) Expand all 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 |