1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "ui/accessibility/ax_node.h"
9 AXNode::AXNode(AXNode
* parent
, int32 id
, int32 index_in_parent
)
10 : index_in_parent_(index_in_parent
),
18 void AXNode::SetData(const AXNodeData
& src
) {
22 void AXNode::SetLocation(const gfx::Rect
& new_location
) {
23 data_
.location
= new_location
;
26 void AXNode::SetIndexInParent(int index_in_parent
) {
27 index_in_parent_
= index_in_parent
;
30 void AXNode::SwapChildren(std::vector
<AXNode
*>& children
) {
31 children
.swap(children_
);
34 void AXNode::Destroy() {
38 bool AXNode::IsDescendantOf(AXNode
* ancestor
) {
42 return parent()->IsDescendantOf(ancestor
);