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

Side by Side Diff: ui/views/accessibility/native_view_accessibility_auralinux.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: Use AX_ATTR_DESCRIPTION instead of adding AX_ATTR_HELP_TEXT, remove use of AX_ATTR_DESCRIPTION from… Created 4 years, 4 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 "ui/views/accessibility/native_view_accessibility_auralinux.h" 5 #include "ui/views/accessibility/native_view_accessibility_auralinux.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 return; 50 return;
51 51
52 widgets_.push_back(widget); 52 widgets_.push_back(widget);
53 widget->AddObserver(this); 53 widget->AddObserver(this);
54 } 54 }
55 55
56 gfx::NativeViewAccessible GetNativeViewAccessible() { 56 gfx::NativeViewAccessible GetNativeViewAccessible() {
57 return platform_node_->GetNativeViewAccessible(); 57 return platform_node_->GetNativeViewAccessible();
58 } 58 }
59 59
60 // 60 // WidgetObserver:
61 // WidgetObserver overrides.
62 //
63 61
64 void OnWidgetDestroying(Widget* widget) override { 62 void OnWidgetDestroying(Widget* widget) override {
65 auto iter = std::find(widgets_.begin(), widgets_.end(), widget); 63 auto iter = std::find(widgets_.begin(), widgets_.end(), widget);
66 if (iter != widgets_.end()) 64 if (iter != widgets_.end())
67 widgets_.erase(iter); 65 widgets_.erase(iter);
68 } 66 }
69 67
70 // 68 // ui::AXPlatformNodeDelegate:
71 // ui::AXPlatformNodeDelegate overrides.
72 //
73 69
74 const ui::AXNodeData& GetData() override { 70 const ui::AXNodeData& GetData() override {
75 return data_; 71 return data_;
76 } 72 }
77 73
74 gfx::NativeWindow GetTopLevelWidget() override { return nullptr; }
75
78 gfx::NativeViewAccessible GetParent() override { 76 gfx::NativeViewAccessible GetParent() override {
79 return nullptr; 77 return nullptr;
80 } 78 }
81 79
82 int GetChildCount() override { 80 int GetChildCount() override {
83 return static_cast<int>(widgets_.size()); 81 return static_cast<int>(widgets_.size());
84 } 82 }
85 83
86 gfx::NativeViewAccessible ChildAtIndex(int index) override { 84 gfx::NativeViewAccessible ChildAtIndex(int index) override {
87 if (index < 0 || index >= GetChildCount()) 85 if (index < 0 || index >= GetChildCount())
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 } 163 }
166 164
167 gfx::NativeViewAccessible NativeViewAccessibilityAuraLinux::GetParent() { 165 gfx::NativeViewAccessible NativeViewAccessibilityAuraLinux::GetParent() {
168 gfx::NativeViewAccessible parent = NativeViewAccessibility::GetParent(); 166 gfx::NativeViewAccessible parent = NativeViewAccessibility::GetParent();
169 if (!parent) 167 if (!parent)
170 parent = AuraLinuxApplication::GetInstance()->GetNativeViewAccessible(); 168 parent = AuraLinuxApplication::GetInstance()->GetNativeViewAccessible();
171 return parent; 169 return parent;
172 } 170 }
173 171
174 } // namespace views 172 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/accessibility/native_view_accessibility.cc ('k') | ui/views/widget/native_widget_mac_accessibility_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698