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

Side by Side Diff: ui/views/accessibility/native_view_accessibility_auralinux.cc

Issue 2474363002: MacViews/a11y: Accessibility actions use AXActionData in AXPlatformNodeDelegate. (Closed)
Patch Set: Review comments. Created 4 years 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
« no previous file with comments | « ui/views/accessibility/native_view_accessibility.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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"
11 #include "base/memory/singleton.h" 11 #include "base/memory/singleton.h"
12 #include "base/stl_util.h" 12 #include "base/stl_util.h"
13 #include "ui/accessibility/ax_action_data.h"
13 #include "ui/accessibility/ax_enums.h" 14 #include "ui/accessibility/ax_enums.h"
14 #include "ui/accessibility/ax_node_data.h" 15 #include "ui/accessibility/ax_node_data.h"
15 #include "ui/accessibility/platform/ax_platform_node_auralinux.h" 16 #include "ui/accessibility/platform/ax_platform_node_auralinux.h"
16 #include "ui/accessibility/platform/ax_platform_node_delegate.h" 17 #include "ui/accessibility/platform/ax_platform_node_delegate.h"
17 #include "ui/gfx/native_widget_types.h" 18 #include "ui/gfx/native_widget_types.h"
18 #include "ui/views/views_delegate.h" 19 #include "ui/views/views_delegate.h"
19 #include "ui/views/widget/widget.h" 20 #include "ui/views/widget/widget.h"
20 #include "ui/views/widget/widget_observer.h" 21 #include "ui/views/widget/widget_observer.h"
21 22
22 namespace views { 23 namespace views {
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 } 100 }
100 101
101 gfx::NativeViewAccessible GetFocus() override { 102 gfx::NativeViewAccessible GetFocus() override {
102 return nullptr; 103 return nullptr;
103 } 104 }
104 105
105 gfx::AcceleratedWidget GetTargetForNativeAccessibilityEvent() override { 106 gfx::AcceleratedWidget GetTargetForNativeAccessibilityEvent() override {
106 return gfx::kNullAcceleratedWidget; 107 return gfx::kNullAcceleratedWidget;
107 } 108 }
108 109
109 void DoDefaultAction() override { 110 bool AccessibilityPerformAction(const ui::AXActionData& data) override {
110 }
111
112 bool SetStringValue(const base::string16& new_value,
113 bool clear_first) override {
114 return false; 111 return false;
115 } 112 }
116 113
117 bool CanSetStringValue() override { return false; } 114 void DoDefaultAction() override {}
118
119 bool SetFocused(bool focused) override { return false; }
120 115
121 private: 116 private:
122 friend struct base::DefaultSingletonTraits<AuraLinuxApplication>; 117 friend struct base::DefaultSingletonTraits<AuraLinuxApplication>;
123 118
124 AuraLinuxApplication() 119 AuraLinuxApplication()
125 : platform_node_(ui::AXPlatformNode::Create(this)) { 120 : platform_node_(ui::AXPlatformNode::Create(this)) {
126 data_.role = ui::AX_ROLE_APPLICATION; 121 data_.role = ui::AX_ROLE_APPLICATION;
127 if (ViewsDelegate::GetInstance()) { 122 if (ViewsDelegate::GetInstance()) {
128 data_.AddStringAttribute( 123 data_.AddStringAttribute(
129 ui::AX_ATTR_NAME, 124 ui::AX_ATTR_NAME,
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 } 163 }
169 164
170 gfx::NativeViewAccessible NativeViewAccessibilityAuraLinux::GetParent() { 165 gfx::NativeViewAccessible NativeViewAccessibilityAuraLinux::GetParent() {
171 gfx::NativeViewAccessible parent = NativeViewAccessibility::GetParent(); 166 gfx::NativeViewAccessible parent = NativeViewAccessibility::GetParent();
172 if (!parent) 167 if (!parent)
173 parent = AuraLinuxApplication::GetInstance()->GetNativeViewAccessible(); 168 parent = AuraLinuxApplication::GetInstance()->GetNativeViewAccessible();
174 return parent; 169 return parent;
175 } 170 }
176 171
177 } // namespace views 172 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/accessibility/native_view_accessibility.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698