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

Unified Diff: content/browser/accessibility/browser_accessibility.cc

Issue 2816273002: Implement GetParent, GetChildCount, ChildAtIndex on BrowserAccessibility (Closed)
Patch Set: stray semi Created 3 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/accessibility/browser_accessibility.cc
diff --git a/content/browser/accessibility/browser_accessibility.cc b/content/browser/accessibility/browser_accessibility.cc
index 95647cb7b211f539967c7e0611bba5342ecc1398..6dc8144dda644347c5cc968eb18bb384fd816f3e 100644
--- a/content/browser/accessibility/browser_accessibility.cc
+++ b/content/browser/accessibility/browser_accessibility.cc
@@ -1149,17 +1149,20 @@ gfx::NativeWindow BrowserAccessibility::GetTopLevelWidget() {
}
gfx::NativeViewAccessible BrowserAccessibility::GetParent() {
- NOTREACHED();
+ auto* parent = PlatformGetParent();
+ if (parent && parent->platform_node_)
+ return parent->platform_node_->GetNativeViewAccessible();
return nullptr;
}
int BrowserAccessibility::GetChildCount() {
- NOTREACHED();
- return -1;
+ return PlatformChildCount();
}
gfx::NativeViewAccessible BrowserAccessibility::ChildAtIndex(int index) {
- NOTREACHED();
+ auto* child = PlatformGetChild(index);
+ if (child && child->platform_node_)
+ return child->platform_node_->GetNativeViewAccessible();
return nullptr;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698