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

Side by Side Diff: content/browser/accessibility/browser_accessibility.cc

Issue 2933353002: Forward four more BrowserAccessibility APIs to AXPlatformNode. (Closed)
Patch Set: linux testing via try Created 3 years, 6 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 (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 1069 matching lines...) Expand 10 before | Expand all | Expand 10 after
1080 // AXPlatformNodeDelegate. 1080 // AXPlatformNodeDelegate.
1081 // 1081 //
1082 const ui::AXNodeData& BrowserAccessibility::GetData() const { 1082 const ui::AXNodeData& BrowserAccessibility::GetData() const {
1083 CR_DEFINE_STATIC_LOCAL(ui::AXNodeData, empty_data, ()); 1083 CR_DEFINE_STATIC_LOCAL(ui::AXNodeData, empty_data, ());
1084 if (node_) 1084 if (node_)
1085 return node_->data(); 1085 return node_->data();
1086 else 1086 else
1087 return empty_data; 1087 return empty_data;
1088 } 1088 }
1089 1089
1090 const ui::AXTreeData& BrowserAccessibility::GetTreeData() const {
1091 CR_DEFINE_STATIC_LOCAL(ui::AXTreeData, empty_data, ());
1092 if (manager())
1093 return manager()->GetTreeData();
1094 else
1095 return empty_data;
1096 }
1097
1090 gfx::NativeWindow BrowserAccessibility::GetTopLevelWidget() { 1098 gfx::NativeWindow BrowserAccessibility::GetTopLevelWidget() {
1091 NOTREACHED(); 1099 NOTREACHED();
1092 return nullptr; 1100 return nullptr;
1093 } 1101 }
1094 1102
1095 gfx::NativeViewAccessible BrowserAccessibility::GetParent() { 1103 gfx::NativeViewAccessible BrowserAccessibility::GetParent() {
1096 auto* parent = PlatformGetParent(); 1104 auto* parent = PlatformGetParent();
1097 if (!parent) 1105 if (!parent)
1098 return nullptr; 1106 return nullptr;
1099 1107
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
1159 return false; 1167 return false;
1160 } 1168 }
1161 1169
1162 bool BrowserAccessibility::ShouldIgnoreHoveredStateForTesting() { 1170 bool BrowserAccessibility::ShouldIgnoreHoveredStateForTesting() {
1163 BrowserAccessibilityStateImpl* accessibility_state = 1171 BrowserAccessibilityStateImpl* accessibility_state =
1164 BrowserAccessibilityStateImpl::GetInstance(); 1172 BrowserAccessibilityStateImpl::GetInstance();
1165 return accessibility_state->disable_hot_tracking_for_testing(); 1173 return accessibility_state->disable_hot_tracking_for_testing();
1166 } 1174 }
1167 1175
1168 } // namespace content 1176 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698