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

Unified Diff: chrome/browser/browser_accessibility_win.cc

Issue 3117036: Update browser cache of accessibility tree on renderer sub-tree changes.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Updating from comments. Created 10 years, 4 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 | « chrome/browser/browser_accessibility_win.h ('k') | chrome/browser/browser_accessibility_win_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/browser_accessibility_win.cc
===================================================================
--- chrome/browser/browser_accessibility_win.cc (revision 57122)
+++ chrome/browser/browser_accessibility_win.cc (working copy)
@@ -55,6 +55,9 @@
}
void BrowserAccessibility::InactivateTree() {
+ if (!instance_active_)
+ return;
+
// Mark this object as inactive, so calls to all COM methods will return
// failure.
instance_active_ = false;
@@ -70,6 +73,7 @@
(*iter)->Release();
}
children_.clear();
+ manager_->Remove(child_id_);
}
bool BrowserAccessibility::IsDescendantOf(BrowserAccessibility* ancestor) {
@@ -82,6 +86,10 @@
return false;
}
+BrowserAccessibility* BrowserAccessibility::GetParent() {
+ return parent_;
+}
+
BrowserAccessibility* BrowserAccessibility::GetPreviousSibling() {
if (parent_ && index_in_parent_ > 0)
return parent_->children_[index_in_parent_ - 1];
@@ -98,6 +106,14 @@
return NULL;
}
+void BrowserAccessibility::ReplaceChild(
+ const BrowserAccessibility* old_acc, BrowserAccessibility* new_acc) {
+ DCHECK_EQ(children_[old_acc->index_in_parent_], old_acc);
+
+ old_acc = children_[old_acc->index_in_parent_];
+ children_[old_acc->index_in_parent_] = new_acc;
+}
+
BrowserAccessibility* BrowserAccessibility::NewReference() {
AddRef();
return this;
« no previous file with comments | « chrome/browser/browser_accessibility_win.h ('k') | chrome/browser/browser_accessibility_win_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698