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

Unified Diff: content/browser/accessibility/browser_accessibility_manager.cc

Issue 558073002: Hook up guest browser plugins to the accessibility tree. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@cross_process_iframes_plugins_3
Patch Set: Rebase Created 6 years, 3 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: 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..bd745cd12fe49baa667bb0591b29c9bb2300b778 100644
--- a/content/browser/accessibility/browser_accessibility_manager.cc
+++ b/content/browser/accessibility/browser_accessibility_manager.cc
@@ -11,34 +11,6 @@
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,
const ui::AXNodeData& node2 /* = ui::AXNodeData() */,
@@ -401,31 +373,4 @@ ui::AXTreeUpdate BrowserAccessibilityManager::SnapshotAXTreeForTesting() {
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

Powered by Google App Engine
This is Rietveld 408576698