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..3caa9a36da220c9484f1f4d58a439c9dca510845 100644 |
--- a/ui/accessibility/platform/ax_platform_node.h |
+++ b/ui/accessibility/platform/ax_platform_node.h |
@@ -6,81 +6,25 @@ |
#define UI_ACCESSIBILITY_PLATFORM_AX_PLATFORM_NODE_H_ |
#include "ui/accessibility/ax_export.h" |
-#include "ui/accessibility/ax_node_data.h" |
+#include "ui/accessibility/platform/ax_platform_node_base.h" |
#include "ui/gfx/native_widget_types.h" |
namespace ui { |
-class AXPlatformNodeDelegate; |
- |
-class AX_EXPORT AXPlatformNode { |
+class AX_EXPORT AXPlatformNode : public AXPlatformNodeBase { |
public: |
+ // Create a platform appropriate instance. |
static AXPlatformNode* Create(AXPlatformNodeDelegate* delegate); |
- virtual ~AXPlatformNode(); |
- virtual void Detach(); |
- virtual gfx::NativeViewAccessible GetNativeViewAccessible(); |
+ // Call Destroy rather than deleting this, because the subclass may |
+ // use reference counting. |
+ virtual void Destroy(); |
- AXPlatformNode* NextSibling(); |
- AXPlatformNode* PreviousSibling(); |
+ virtual gfx::NativeViewAccessible GetNativeViewAccessible(); |
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; |
- |
- bool HasFloatAttribute(ui::AXFloatAttribute attr) const; |
- float GetFloatAttribute(ui::AXFloatAttribute attr) const; |
- bool GetFloatAttribute(ui::AXFloatAttribute attr, float* value) const; |
- |
- bool HasIntAttribute(ui::AXIntAttribute attribute) const; |
- int GetIntAttribute(ui::AXIntAttribute attribute) const; |
- bool GetIntAttribute(ui::AXIntAttribute attribute, int* value) const; |
- |
- 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; |
- |
- AXPlatformNodeDelegate* delegate_; |
+ virtual ~AXPlatformNode(); |
}; |
} // namespace ui |