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 1168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1179 | 1179 |
1180 return bounds; | 1180 return bounds; |
1181 } | 1181 } |
1182 | 1182 |
1183 gfx::NativeViewAccessible BrowserAccessibility::HitTestSync(int x, int y) { | 1183 gfx::NativeViewAccessible BrowserAccessibility::HitTestSync(int x, int y) { |
1184 NOTREACHED(); | 1184 NOTREACHED(); |
1185 return nullptr; | 1185 return nullptr; |
1186 } | 1186 } |
1187 | 1187 |
1188 gfx::NativeViewAccessible BrowserAccessibility::GetFocus() { | 1188 gfx::NativeViewAccessible BrowserAccessibility::GetFocus() { |
1189 NOTREACHED(); | 1189 auto* focused = manager()->GetFocus(); |
1190 return nullptr; | 1190 if (!focused) |
| 1191 return nullptr; |
| 1192 |
| 1193 return focused->GetNativeViewAccessible(); |
1191 } | 1194 } |
1192 | 1195 |
1193 gfx::AcceleratedWidget | 1196 gfx::AcceleratedWidget |
1194 BrowserAccessibility::GetTargetForNativeAccessibilityEvent() { | 1197 BrowserAccessibility::GetTargetForNativeAccessibilityEvent() { |
1195 NOTREACHED(); | 1198 BrowserAccessibilityDelegate* root_delegate = |
1196 return gfx::kNullAcceleratedWidget; | 1199 manager()->GetDelegateFromRootManager(); |
| 1200 if (!root_delegate) |
| 1201 return gfx::kNullAcceleratedWidget; |
| 1202 return root_delegate->AccessibilityGetAcceleratedWidget(); |
1197 } | 1203 } |
1198 | 1204 |
1199 bool BrowserAccessibility::AccessibilityPerformAction( | 1205 bool BrowserAccessibility::AccessibilityPerformAction( |
1200 const ui::AXActionData& data) { | 1206 const ui::AXActionData& data) { |
1201 NOTREACHED(); | 1207 if (data.action == ui::AX_ACTION_DO_DEFAULT) { |
| 1208 manager_->DoDefaultAction(*this); |
| 1209 return true; |
| 1210 } |
| 1211 |
1202 return false; | 1212 return false; |
1203 } | 1213 } |
1204 | 1214 |
1205 } // namespace content | 1215 } // namespace content |
OLD | NEW |