| Index: ui/accessibility/ax_node_data.h
|
| diff --git a/content/common/accessibility_node_data.h b/ui/accessibility/ax_node_data.h
|
| similarity index 75%
|
| copy from content/common/accessibility_node_data.h
|
| copy to ui/accessibility/ax_node_data.h
|
| index ed39508bb2dd1f6818321d36a0e224766b4ee857..d220732fdf7d407d97190c2a2007a2428f91ef9c 100644
|
| --- a/content/common/accessibility_node_data.h
|
| +++ b/ui/accessibility/ax_node_data.h
|
| @@ -1,25 +1,25 @@
|
| -// Copyright (c) 2012 The Chromium Authors. All rights reserved.
|
| +// Copyright (c) 2013 The Chromium Authors. All rights reserved.
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| -#ifndef CONTENT_COMMON_ACCESSIBILITY_NODE_DATA_H_
|
| -#define CONTENT_COMMON_ACCESSIBILITY_NODE_DATA_H_
|
| +#ifndef UI_ACCESSIBILITY_AX_NODE_DATA_H_
|
| +#define UI_ACCESSIBILITY_AX_NODE_DATA_H_
|
|
|
| #include <map>
|
| #include <string>
|
| #include <vector>
|
|
|
| #include "base/strings/string16.h"
|
| -#include "content/common/content_export.h"
|
| -#include "third_party/WebKit/public/web/WebAXEnums.h"
|
| +#include "ui/accessibility/ax_enums.h"
|
| +#include "ui/accessibility/ax_export.h"
|
| #include "ui/gfx/rect.h"
|
|
|
| -namespace content {
|
| +namespace ui {
|
|
|
| // A compact representation of the accessibility information for a
|
| // single web object, in a form that can be serialized and sent from
|
| -// the renderer process to the browser process.
|
| -struct CONTENT_EXPORT AccessibilityNodeData {
|
| +// one process to another.
|
| +struct AX_EXPORT AXNodeData {
|
| // Additional optional attributes that can be optionally attached to
|
| // a node.
|
| enum StringAttribute {
|
| @@ -85,7 +85,7 @@ struct CONTENT_EXPORT AccessibilityNodeData {
|
| // Relationships between this element and other elements.
|
| ATTR_TITLE_UI_ELEMENT,
|
|
|
| - // Color value for blink::WebAXRoleColorWell, each component is 0..255
|
| + // Color value for AX_ROLE_COLOR_WELL, each component is 0..255
|
| ATTR_COLOR_VALUE_RED,
|
| ATTR_COLOR_VALUE_GREEN,
|
| ATTR_COLOR_VALUE_BLUE,
|
| @@ -164,8 +164,8 @@ struct CONTENT_EXPORT AccessibilityNodeData {
|
| ATTR_WORD_ENDS,
|
| };
|
|
|
| - AccessibilityNodeData();
|
| - virtual ~AccessibilityNodeData();
|
| + AXNodeData();
|
| + virtual ~AXNodeData();
|
|
|
| void AddStringAttribute(StringAttribute attribute,
|
| const std::string& value);
|
| @@ -181,14 +181,10 @@ struct CONTENT_EXPORT AccessibilityNodeData {
|
| // Equivalent to AddStringAttribute(ATTR_VALUE, value).
|
| void SetValue(std::string value);
|
|
|
| - #ifndef NDEBUG
|
| - virtual std::string DebugString(bool recursive) const;
|
| - #endif
|
| -
|
| // This is a simple serializable struct. All member variables should be
|
| // public and copyable.
|
| int32 id;
|
| - blink::WebAXRole role;
|
| + AXRole role;
|
| uint32 state;
|
| gfx::Rect location;
|
| std::vector<std::pair<StringAttribute, std::string> > string_attributes;
|
| @@ -201,33 +197,6 @@ struct CONTENT_EXPORT AccessibilityNodeData {
|
| std::vector<int32> child_ids;
|
| };
|
|
|
| -// For testing and debugging only: this subclass of AccessibilityNodeData
|
| -// is used to represent a whole tree of accessibility nodes, where each
|
| -// node owns its children. This makes it easy to print the tree structure
|
| -// or search it recursively.
|
| -struct CONTENT_EXPORT AccessibilityNodeDataTreeNode
|
| - : public AccessibilityNodeData {
|
| - AccessibilityNodeDataTreeNode();
|
| - virtual ~AccessibilityNodeDataTreeNode();
|
| -
|
| - AccessibilityNodeDataTreeNode& operator=(const AccessibilityNodeData& src);
|
| -
|
| - #ifndef NDEBUG
|
| - virtual std::string DebugString(bool recursive) const OVERRIDE;
|
| - #endif
|
| -
|
| - std::vector<AccessibilityNodeDataTreeNode> children;
|
| -};
|
| -
|
| -// Given a vector of accessibility nodes that represent a complete
|
| -// accessibility tree, where each node appears before its children,
|
| -// build a tree of AccessibilityNodeDataTreeNode objects for easier
|
| -// testing and debugging, where each node contains its children.
|
| -// The |dst| argument will become the root of the new tree.
|
| -void MakeAccessibilityNodeDataTree(
|
| - const std::vector<AccessibilityNodeData>& src,
|
| - AccessibilityNodeDataTreeNode* dst);
|
| -
|
| -} // namespace content
|
| +} // namespace ui
|
|
|
| -#endif // CONTENT_COMMON_ACCESSIBILITY_NODE_DATA_H_
|
| +#endif // UI_ACCESSIBILITY_AX_NODE_DATA_H_
|
|
|