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

Unified Diff: ui/accessibility/platform/ax_platform_node.h

Issue 420653003: MacViews: Accessibility bridge (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 2nd draft, based on 423513005 Created 6 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: ui/accessibility/platform/ax_platform_node.h
diff --git a/ui/accessibility/platform/ax_platform_node.h b/ui/accessibility/platform/ax_platform_node.h
index cbe6632bc99c5dd5bfc0b3c838a28be06b366653..53421f390809acb4a6db97b32bb154caeac210d2 100644
--- a/ui/accessibility/platform/ax_platform_node.h
+++ b/ui/accessibility/platform/ax_platform_node.h
@@ -5,8 +5,9 @@
#ifndef UI_ACCESSIBILITY_PLATFORM_AX_PLATFORM_NODE_H_
#define UI_ACCESSIBILITY_PLATFORM_AX_PLATFORM_NODE_H_
+#include "ui/accessibility/ax_enums.h"
#include "ui/accessibility/ax_export.h"
-#include "ui/accessibility/ax_node_data.h"
+#include "ui/gfx/geometry/rect.h"
#include "ui/gfx/native_widget_types.h"
namespace ui {
@@ -19,66 +20,23 @@ class AX_EXPORT AXPlatformNode {
virtual ~AXPlatformNode();
virtual void Detach();
- virtual gfx::NativeViewAccessible GetNativeViewAccessible();
+ virtual gfx::NativeViewAccessible GetNativeViewAccessible() = 0;
- AXPlatformNode* NextSibling();
- AXPlatformNode* PreviousSibling();
+ AXRole GetRole() const;
dmazzoni 2014/07/29 06:35:14 I don't want these to be part of the public interf
+ gfx::Rect GetBoundsInScreen() const;
- protected:
- AXPlatformNode();
-
- virtual void Init(AXPlatformNodeDelegate* delegate);
-
- bool IsAncestor
-
- // Accessing accessibility attributes:
- //
- // There are dozens of possible attributes for an accessibility node,
- // but only a few tend to apply to any one object, so we store them
- // in sparse arrays of <attribute id, attribute value> pairs, organized
- // by type (bool, int, float, string, int list).
- //
- // There are three accessors for each type of attribute: one that returns
- // true if the attribute is present and false if not, one that takes a
- // pointer argument and returns true if the attribute is present (if you
- // need to distinguish between the default value and a missing attribute),
- // and another that returns the default value for that type if the
- // attribute is not present. In addition, strings can be returned as
- // either std::string or base::string16, for convenience.
-
- bool HasBoolAttribute(ui::AXBoolAttribute attr) const;
- bool GetBoolAttribute(ui::AXBoolAttribute attr) const;
- bool GetBoolAttribute(ui::AXBoolAttribute attr, bool* value) const;
+ // Get the parent of the node unless it's the root, then it returns NULL.
+ gfx::NativeViewAccessible GetParent();
- bool HasFloatAttribute(ui::AXFloatAttribute attr) const;
- float GetFloatAttribute(ui::AXFloatAttribute attr) const;
- bool GetFloatAttribute(ui::AXFloatAttribute attr, float* value) const;
+ // Get the number of children of this node.
+ int GetChildCount();
- bool HasIntAttribute(ui::AXIntAttribute attribute) const;
- int GetIntAttribute(ui::AXIntAttribute attribute) const;
- bool GetIntAttribute(ui::AXIntAttribute attribute, int* value) const;
+ // Get the child of a node from [0...GetChildCount() - 1]
+ gfx::NativeViewAccessible ChildAtIndex(int index);
- bool HasStringAttribute(
- ui::AXStringAttribute attribute) const;
- const std::string& GetStringAttribute(ui::AXStringAttribute attribute) const;
- bool GetStringAttribute(ui::AXStringAttribute attribute,
- std::string* value) const;
-
- bool GetString16Attribute(ui::AXStringAttribute attribute,
- base::string16* value) const;
- base::string16 GetString16Attribute(
- ui::AXStringAttribute attribute) const;
-
- bool HasIntListAttribute(ui::AXIntListAttribute attribute) const;
- const std::vector<int32>& GetIntListAttribute(
- ui::AXIntListAttribute attribute) const;
- bool GetIntListAttribute(ui::AXIntListAttribute attribute,
- std::vector<int32>* value) const;
-
- // Retrieve the value of a html attribute from the attribute map and
- // returns true if found.
- bool GetHtmlAttribute(const char* attr, base::string16* value) const;
- bool GetHtmlAttribute(const char* attr, std::string* value) const;
+ protected:
+ AXPlatformNode();
+ virtual void Init(AXPlatformNodeDelegate* delegate);
AXPlatformNodeDelegate* delegate_;
};

Powered by Google App Engine
This is Rietveld 408576698