OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "content/browser/accessibility/browser_accessibility.h" | 5 #include "content/browser/accessibility/browser_accessibility.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 #include <iterator> | 10 #include <iterator> |
(...skipping 1068 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1079 // AXPlatformNodeDelegate. | 1079 // AXPlatformNodeDelegate. |
1080 // | 1080 // |
1081 const ui::AXNodeData& BrowserAccessibility::GetData() const { | 1081 const ui::AXNodeData& BrowserAccessibility::GetData() const { |
1082 CR_DEFINE_STATIC_LOCAL(ui::AXNodeData, empty_data, ()); | 1082 CR_DEFINE_STATIC_LOCAL(ui::AXNodeData, empty_data, ()); |
1083 if (node_) | 1083 if (node_) |
1084 return node_->data(); | 1084 return node_->data(); |
1085 else | 1085 else |
1086 return empty_data; | 1086 return empty_data; |
1087 } | 1087 } |
1088 | 1088 |
| 1089 const ui::AXTreeData& BrowserAccessibility::GetTreeData() const { |
| 1090 CR_DEFINE_STATIC_LOCAL(ui::AXTreeData, empty_data, ()); |
| 1091 if (manager()) |
| 1092 return manager()->GetTreeData(); |
| 1093 else |
| 1094 return empty_data; |
| 1095 } |
| 1096 |
1089 gfx::NativeWindow BrowserAccessibility::GetTopLevelWidget() { | 1097 gfx::NativeWindow BrowserAccessibility::GetTopLevelWidget() { |
1090 NOTREACHED(); | 1098 NOTREACHED(); |
1091 return nullptr; | 1099 return nullptr; |
1092 } | 1100 } |
1093 | 1101 |
1094 gfx::NativeViewAccessible BrowserAccessibility::GetParent() { | 1102 gfx::NativeViewAccessible BrowserAccessibility::GetParent() { |
1095 auto* parent = PlatformGetParent(); | 1103 auto* parent = PlatformGetParent(); |
1096 if (!parent) | 1104 if (!parent) |
1097 return nullptr; | 1105 return nullptr; |
1098 | 1106 |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1152 | 1160 |
1153 if (data.action == ui::AX_ACTION_FOCUS) { | 1161 if (data.action == ui::AX_ACTION_FOCUS) { |
1154 manager_->SetFocus(*this); | 1162 manager_->SetFocus(*this); |
1155 return true; | 1163 return true; |
1156 } | 1164 } |
1157 | 1165 |
1158 return false; | 1166 return false; |
1159 } | 1167 } |
1160 | 1168 |
1161 } // namespace content | 1169 } // namespace content |
OLD | NEW |