Index: content/browser/accessibility/browser_accessibility_manager.cc |
diff --git a/content/browser/accessibility/browser_accessibility_manager.cc b/content/browser/accessibility/browser_accessibility_manager.cc |
index a4e7db5f275228c28ab9e39140ff5cfa36e3aad8..6bdce2d907a503186a04788d2ba7731723866923 100644 |
--- a/content/browser/accessibility/browser_accessibility_manager.cc |
+++ b/content/browser/accessibility/browser_accessibility_manager.cc |
@@ -7,37 +7,8 @@ |
#include "base/logging.h" |
#include "content/browser/accessibility/browser_accessibility.h" |
#include "content/common/accessibility_messages.h" |
-#include "ui/accessibility/ax_tree_serializer.h" |
namespace content { |
- |
-namespace { |
- |
-// Recursively searches |ancestor_node| and its descendants for a |
-// BrowserAccessibility with |child| as its immediate and only child. |
-// Searches only the frame that |ancestor_node| belongs to, does not descend |
-// into child frames (but |child| can be the root of another frame). |
-BrowserAccessibility* FindParentOfNode( |
- BrowserAccessibility* ancestor_node, BrowserAccessibility* child) { |
- if (ancestor_node->PlatformChildCount() == 1 && |
- ancestor_node->PlatformGetChild(0) == child) { |
- return ancestor_node; |
- } |
- |
- if (ancestor_node->InternalChildCount() == 0) |
- return NULL; |
- |
- for (uint32 i = 0; i < ancestor_node->PlatformChildCount(); ++i) { |
- BrowserAccessibility* result = FindParentOfNode( |
- ancestor_node->PlatformGetChild(i), child); |
- if (result) |
- return result; |
- } |
- |
- return NULL; |
-} |
- |
-} // namespace. |
ui::AXTreeUpdate MakeAXTreeUpdate( |
const ui::AXNodeData& node1, |
@@ -96,7 +67,7 @@ |
BrowserAccessibilityFactory* factory) |
: delegate_(delegate), |
factory_(factory), |
- tree_(new ui::AXSerializableTree()), |
+ tree_(new ui::AXTree()), |
focus_(NULL), |
osk_state_(OSK_ALLOWED) { |
tree_->SetDelegate(this); |
@@ -108,7 +79,7 @@ |
BrowserAccessibilityFactory* factory) |
: delegate_(delegate), |
factory_(factory), |
- tree_(new ui::AXSerializableTree()), |
+ tree_(new ui::AXTree()), |
focus_(NULL), |
osk_state_(OSK_ALLOWED) { |
tree_->SetDelegate(this); |
@@ -392,40 +363,4 @@ |
GetFromAXNode(node)->OnUpdateFinished(); |
} |
-ui::AXTreeUpdate BrowserAccessibilityManager::SnapshotAXTreeForTesting() { |
- scoped_ptr<ui::AXTreeSource<const ui::AXNode*> > tree_source( |
- tree_->CreateTreeSource()); |
- ui::AXTreeSerializer<const ui::AXNode*> serializer(tree_source.get()); |
- ui::AXTreeUpdate update; |
- serializer.SerializeChanges(tree_->GetRoot(), &update); |
- return update; |
-} |
- |
-void BrowserAccessibilityManager::SetChildFrameTreeNodeId( |
- int32 node_id, int64 child_frame_tree_node_id) { |
- BrowserAccessibility* node = GetFromID(node_id); |
- if (node) { |
- // The node id passed to us is the web area for the proxy frame. |
- // In order to replace this node with the child frame, set the |
- // child frame id on its parent. |
- BrowserAccessibility* node_parent = node->GetParent(); |
- if (node_parent) |
- node_parent->SetChildFrameTreeNodeId(child_frame_tree_node_id); |
- } |
-} |
- |
-BrowserAccessibility* BrowserAccessibilityManager::GetCrossFrameParent() { |
- if (!delegate_) |
- return NULL; |
- |
- BrowserAccessibilityManager* parent_frame = |
- delegate_->AccessibilityGetParentFrame(); |
- if (!parent_frame) |
- return NULL; |
- |
- // Recursively search the parent frame to find the node that has this |
- // frame as its child. |
- return FindParentOfNode(parent_frame->GetRoot(), GetRoot()); |
-} |
- |
} // namespace content |