| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "base/containers/hash_tables.h" | 5 #include "base/containers/hash_tables.h" |
| 6 #include "ui/accessibility/platform/test_ax_node_wrapper.h" | 6 #include "ui/accessibility/platform/test_ax_node_wrapper.h" |
| 7 | 7 |
| 8 namespace ui { | 8 namespace ui { |
| 9 | 9 |
| 10 namespace { | 10 namespace { |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 } | 64 } |
| 65 | 65 |
| 66 TestAXNodeWrapper::~TestAXNodeWrapper() { | 66 TestAXNodeWrapper::~TestAXNodeWrapper() { |
| 67 platform_node_->Destroy(); | 67 platform_node_->Destroy(); |
| 68 } | 68 } |
| 69 | 69 |
| 70 const AXNodeData& TestAXNodeWrapper::GetData() { | 70 const AXNodeData& TestAXNodeWrapper::GetData() { |
| 71 return node_->data(); | 71 return node_->data(); |
| 72 } | 72 } |
| 73 | 73 |
| 74 gfx::NativeWindow TestAXNodeWrapper::GetTopLevelWidget() { |
| 75 return nullptr; |
| 76 } |
| 77 |
| 74 gfx::NativeViewAccessible TestAXNodeWrapper::GetParent() { | 78 gfx::NativeViewAccessible TestAXNodeWrapper::GetParent() { |
| 75 TestAXNodeWrapper* parent_wrapper = GetOrCreate(tree_, node_->parent()); | 79 TestAXNodeWrapper* parent_wrapper = GetOrCreate(tree_, node_->parent()); |
| 76 return parent_wrapper ? | 80 return parent_wrapper ? |
| 77 parent_wrapper->ax_platform_node()->GetNativeViewAccessible() : | 81 parent_wrapper->ax_platform_node()->GetNativeViewAccessible() : |
| 78 nullptr; | 82 nullptr; |
| 79 } | 83 } |
| 80 | 84 |
| 81 int TestAXNodeWrapper::GetChildCount() { | 85 int TestAXNodeWrapper::GetChildCount() { |
| 82 return node_->child_count(); | 86 return node_->child_count(); |
| 83 } | 87 } |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 return false; | 120 return false; |
| 117 } | 121 } |
| 118 | 122 |
| 119 TestAXNodeWrapper::TestAXNodeWrapper(AXTree* tree, AXNode* node) | 123 TestAXNodeWrapper::TestAXNodeWrapper(AXTree* tree, AXNode* node) |
| 120 : tree_(tree), | 124 : tree_(tree), |
| 121 node_(node), | 125 node_(node), |
| 122 platform_node_(AXPlatformNode::Create(this)) { | 126 platform_node_(AXPlatformNode::Create(this)) { |
| 123 } | 127 } |
| 124 | 128 |
| 125 } // namespace ui | 129 } // namespace ui |
| OLD | NEW |