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

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

Issue 2886353003: Remove BrowserAccessibility::platform_node_ (Closed)
Patch Set: Created 3 years, 7 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
Index: content/browser/accessibility/browser_accessibility.cc
diff --git a/content/browser/accessibility/browser_accessibility.cc b/content/browser/accessibility/browser_accessibility.cc
index 4e96eb28e5a3bdf2a074ef3674a1bcc3c4840b0c..82fe21cbcd355f7f80b3d633d86cbf6144bf600b 100644
--- a/content/browser/accessibility/browser_accessibility.cc
+++ b/content/browser/accessibility/browser_accessibility.cc
@@ -40,16 +40,13 @@ BrowserAccessibility* BrowserAccessibility::Create() {
BrowserAccessibility::BrowserAccessibility()
: manager_(nullptr),
node_(nullptr),
- unique_id_(ui::GetNextAXPlatformNodeUniqueId()),
- platform_node_(nullptr) {
+ unique_id_(ui::GetNextAXPlatformNodeUniqueId()) {
g_unique_id_map.Get()[unique_id_] = this;
}
BrowserAccessibility::~BrowserAccessibility() {
if (unique_id_)
g_unique_id_map.Get().erase(unique_id_);
- if (platform_node_)
- platform_node_->Destroy();
}
// static
@@ -65,13 +62,6 @@ void BrowserAccessibility::Init(BrowserAccessibilityManager* manager,
ui::AXNode* node) {
manager_ = manager;
node_ = node;
-
-// Here we create the AXPlatformNode which contains a platform-specific
-// implementation of requried accessibility APIS for this node. At this point,
-// we only are creating this object for Windows. See http://crbug.com/703369
-#if defined(OS_WIN)
- platform_node_ = ui::AXPlatformNode::Create(this);
-#endif
}
bool BrowserAccessibility::PlatformIsLeaf() const {
@@ -1139,6 +1129,11 @@ gfx::Rect BrowserAccessibility::RelativeToAbsoluteBounds(
return gfx::ToEnclosingRect(bounds);
}
+gfx::NativeViewAccessible BrowserAccessibility::GetNativeViewAccessible() {
+ NOTREACHED();
dmazzoni 2017/05/19 19:36:42 Maybe add a comment saying we should implement thi
+ return nullptr;
+}
+
//
// AXPlatformNodeDelegate.
//
@@ -1157,9 +1152,10 @@ gfx::NativeWindow BrowserAccessibility::GetTopLevelWidget() {
gfx::NativeViewAccessible BrowserAccessibility::GetParent() {
auto* parent = PlatformGetParent();
- if (parent && parent->platform_node_)
- return parent->platform_node_->GetNativeViewAccessible();
- return nullptr;
+ if (!parent)
+ return nullptr;
+
+ return parent->GetNativeViewAccessible();
}
int BrowserAccessibility::GetChildCount() {
@@ -1168,9 +1164,10 @@ int BrowserAccessibility::GetChildCount() {
gfx::NativeViewAccessible BrowserAccessibility::ChildAtIndex(int index) {
auto* child = PlatformGetChild(index);
- if (child && child->platform_node_)
- return child->platform_node_->GetNativeViewAccessible();
- return nullptr;
+ if (!child)
+ return nullptr;
+
+ return child->GetNativeViewAccessible();
}
gfx::Rect BrowserAccessibility::GetScreenBoundsRect() const {
« no previous file with comments | « content/browser/accessibility/browser_accessibility.h ('k') | content/browser/accessibility/browser_accessibility_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698