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

Side by Side Diff: ui/accessibility/platform/test_ax_node_wrapper.cc

Issue 2141013004: Mac a11y: Add Help, TopLevelUIElement, and Window accessibility attributes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add null check for NVA::GetTopLevelWidget(). Created 4 years, 5 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 unified diff | Download patch
OLDNEW
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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698