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

Unified Diff: ui/accessibility/ax_node.h

Issue 851853002: It is time. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Trying to reup because the last upload failed. Created 5 years, 11 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
« no previous file with comments | « ui/accessibility/ax_generated_tree_unittest.cc ('k') | ui/accessibility/ax_node.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/accessibility/ax_node.h
diff --git a/ui/accessibility/ax_node.h b/ui/accessibility/ax_node.h
deleted file mode 100644
index 5da73401c535010b3dbb6acc0340b8b87cba54a9..0000000000000000000000000000000000000000
--- a/ui/accessibility/ax_node.h
+++ /dev/null
@@ -1,68 +0,0 @@
-// Copyright 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 UI_ACCESSIBILITY_AX_NODE_H_
-#define UI_ACCESSIBILITY_AX_NODE_H_
-
-#include "ui/accessibility/ax_node_data.h"
-
-namespace ui {
-
-// One node in an AXTree.
-class AX_EXPORT AXNode {
- public:
- // The constructor requires a parent, id, and index in parent, but
- // the data is not required. After initialization, only index_in_parent
- // is allowed to change, the others are guaranteed to never change.
- AXNode(AXNode* parent, int32 id, int32 index_in_parent);
- virtual ~AXNode();
-
- // Accessors.
- int32 id() const { return data_.id; }
- AXNode* parent() const { return parent_; }
- int child_count() const { return static_cast<int>(children_.size()); }
- const AXNodeData& data() const { return data_; }
- const std::vector<AXNode*>& children() const { return children_; }
- int index_in_parent() const { return index_in_parent_; }
-
- // Get the child at the given index.
- AXNode* ChildAtIndex(int index) const { return children_[index]; }
-
- // Set the node's accessibility data. This may be done during initial
- // initialization or later when the node data changes.
- void SetData(const AXNodeData& src);
-
- // Update this node's location. This is separate from SetData just because
- // changing only the location is common and should be more efficient than
- // re-copying all of the data.
- void SetLocation(const gfx::Rect& new_location);
-
- // Set the index in parent, for example if siblings were inserted or deleted.
- void SetIndexInParent(int index_in_parent);
-
- // Swap the internal children vector with |children|. This instance
- // now owns all of the passed children.
- void SwapChildren(std::vector<AXNode*>& children);
-
- // This is called when the AXTree no longer includes this node in the
- // tree. Reference counting is used on some platforms because the
- // operating system may hold onto a reference to an AXNode
- // object even after we're through with it, so this may decrement the
- // reference count and clear out the object's data.
- void Destroy();
-
- // Return true if this object is equal to or a descendant of |ancestor|.
- bool IsDescendantOf(AXNode* ancestor);
-
- private:
- int index_in_parent_;
- AXNode* parent_;
- std::vector<AXNode*> children_;
- AXNodeData data_;
-};
-
-
-} // namespace ui
-
-#endif // UI_ACCESSIBILITY_AX_NODE_H_
« no previous file with comments | « ui/accessibility/ax_generated_tree_unittest.cc ('k') | ui/accessibility/ax_node.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698