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

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

Issue 2763803002: BrowserAccessibility should own a AXPlatformNode. (Closed)
Patch Set: Windows Only Created 3 years, 9 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 | « content/browser/accessibility/browser_accessibility.h ('k') | 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 e48625d5595dc23f03d5d311d0a5b7d93a1c91ff..8583ed1ca6c15ac0aa676037ab5ab2a77315d762 100644
--- a/content/browser/accessibility/browser_accessibility.cc
+++ b/content/browser/accessibility/browser_accessibility.cc
@@ -37,15 +37,18 @@ BrowserAccessibility* BrowserAccessibility::Create() {
#endif
BrowserAccessibility::BrowserAccessibility()
- : manager_(NULL),
- node_(NULL),
- unique_id_(ui::GetNextAXPlatformNodeUniqueId()) {
+ : manager_(nullptr),
+ node_(nullptr),
+ unique_id_(ui::GetNextAXPlatformNodeUniqueId()),
+ platform_node_(nullptr) {
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
@@ -61,6 +64,13 @@ 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 {
« no previous file with comments | « content/browser/accessibility/browser_accessibility.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698