Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(523)

Side by Side Diff: ui/accessibility/platform/ax_platform_node_delegate.h

Issue 2933353002: Forward four more BrowserAccessibility APIs to AXPlatformNode. (Closed)
Patch Set: Use SkColor.h instead Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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"
11 #include "ui/gfx/native_widget_types.h" 11 #include "ui/gfx/native_widget_types.h"
12 12
13 namespace ui { 13 namespace ui {
14 14
15 struct AXActionData; 15 struct AXActionData;
16 struct AXNodeData; 16 struct AXNodeData;
17 struct AXTreeData;
17 class AXPlatformNode; 18 class AXPlatformNode;
18 19
19 // An object that wants to be accessible should derive from this class. 20 // An object that wants to be accessible should derive from this class.
20 // AXPlatformNode subclasses use this interface to query all of the information 21 // AXPlatformNode subclasses use this interface to query all of the information
21 // about the object in order to implement native accessibility APIs. 22 // about the object in order to implement native accessibility APIs.
22 // 23 //
23 // Note that AXPlatformNode has support for accessibility trees where some 24 // Note that AXPlatformNode has support for accessibility trees where some
24 // of the objects in the tree are not implemented using AXPlatformNode. 25 // of the objects in the tree are not implemented using AXPlatformNode.
25 // For example, you may have a native window with platform-native widgets 26 // For example, you may have a native window with platform-native widgets
26 // in it, but in that window you have custom controls that use AXPlatformNode 27 // in it, but in that window you have custom controls that use AXPlatformNode
27 // to provide accessibility. That's why GetParent, ChildAtIndex, HitTestSync, 28 // to provide accessibility. That's why GetParent, ChildAtIndex, HitTestSync,
28 // and GetFocus all return a gfx::NativeViewAccessible - so you can return a 29 // and GetFocus all return a gfx::NativeViewAccessible - so you can return a
29 // native accessible if necessary, and AXPlatformNode::GetNativeViewAccessible 30 // native accessible if necessary, and AXPlatformNode::GetNativeViewAccessible
30 // otherwise. 31 // otherwise.
31 class AX_EXPORT AXPlatformNodeDelegate { 32 class AX_EXPORT AXPlatformNodeDelegate {
32 public: 33 public:
33 // Get the accessibility data that should be exposed for this node. 34 // Get the accessibility data that should be exposed for this node.
34 // Virtually all of the information is obtained from this structure 35 // Virtually all of the information is obtained from this structure
35 // (role, state, name, cursor position, etc.) - the rest of this interface 36 // (role, state, name, cursor position, etc.) - the rest of this interface
36 // is mostly to implement support for walking the accessibility tree. 37 // is mostly to implement support for walking the accessibility tree.
37 virtual const AXNodeData& GetData() const = 0; 38 virtual const AXNodeData& GetData() const = 0;
38 39
40 // Get the accessibility tree data for this node.
41 virtual const ui::AXTreeData& GetTreeData() const = 0;
42
39 // Get the window the node is contained in. 43 // Get the window the node is contained in.
40 virtual gfx::NativeWindow GetTopLevelWidget() = 0; 44 virtual gfx::NativeWindow GetTopLevelWidget() = 0;
41 45
42 // Get the parent of the node, which may be an AXPlatformNode or it may 46 // Get the parent of the node, which may be an AXPlatformNode or it may
43 // be a native accessible object implemented by another class. 47 // be a native accessible object implemented by another class.
44 virtual gfx::NativeViewAccessible GetParent() = 0; 48 virtual gfx::NativeViewAccessible GetParent() = 0;
45 49
46 // Get the number of children of this node. 50 // Get the number of children of this node.
47 virtual int GetChildCount() = 0; 51 virtual int GetChildCount() = 0;
48 52
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 // 86 //
83 87
84 // Perform an accessibility action, switching on the ui::AXAction 88 // Perform an accessibility action, switching on the ui::AXAction
85 // provided in |data|. 89 // provided in |data|.
86 virtual bool AccessibilityPerformAction(const ui::AXActionData& data) = 0; 90 virtual bool AccessibilityPerformAction(const ui::AXActionData& data) = 0;
87 }; 91 };
88 92
89 } // namespace ui 93 } // namespace ui
90 94
91 #endif // UI_ACCESSIBILITY_PLATFORM_AX_PLATFORM_NODE_DELEGATE_H_ 95 #endif // UI_ACCESSIBILITY_PLATFORM_AX_PLATFORM_NODE_DELEGATE_H_
OLDNEW
« no previous file with comments | « ui/accessibility/platform/ax_platform_node_base.cc ('k') | ui/accessibility/platform/ax_platform_node_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698