| Index: content/common/ax_node_impl.cc
|
| diff --git a/content/common/ax_node_impl.cc b/content/common/ax_node_impl.cc
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..917827a199c7cb3bcfb480bccee20ad8d23cda04
|
| --- /dev/null
|
| +++ b/content/common/ax_node_impl.cc
|
| @@ -0,0 +1,59 @@
|
| +// 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.
|
| +
|
| +#include "content/common/ax_node_impl.h"
|
| +
|
| +namespace content {
|
| +
|
| +AXNodeImpl::AXNodeImpl()
|
| + : index_in_parent_(0),
|
| + parent_(NULL) {
|
| +}
|
| +
|
| +AXNodeImpl::~AXNodeImpl() {
|
| +}
|
| +
|
| +int32 AXNodeImpl::GetId() const {
|
| + return data_.id;
|
| +}
|
| +
|
| +AXNode* AXNodeImpl::GetParent() const {
|
| + return parent_;
|
| +}
|
| +
|
| +int AXNodeImpl::GetChildCount() const {
|
| + return static_cast<int>(children_.size());
|
| +}
|
| +
|
| +AXNode* AXNodeImpl::ChildAtIndex(int index) const {
|
| + return children_[index];
|
| +}
|
| +
|
| +const AXNodeData& AXNodeImpl::data() const {
|
| + return data_;
|
| +}
|
| +
|
| +void AXNodeImpl::Init(AXNodeImpl* parent, int32 id, int32 index_in_parent) {
|
| + parent_ = parent;
|
| + data_.id = id;
|
| + index_in_parent_ = index_in_parent;
|
| +}
|
| +
|
| +void AXNodeImpl::SetData(const AXNodeData& src) {
|
| + data_ = src;
|
| +}
|
| +
|
| +void AXNodeImpl::UpdateIndexInParent(int index_in_parent) {
|
| + index_in_parent_ = index_in_parent;
|
| +}
|
| +
|
| +void AXNodeImpl::SwapChildren(std::vector<AXNodeImpl*>& children) {
|
| + children.swap(children_);
|
| +}
|
| +
|
| +void AXNodeImpl::Destroy() {
|
| + delete this;
|
| +}
|
| +
|
| +} // namespace content
|
|
|