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

Unified Diff: chrome/renderer/render_view.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/renderer/render_view.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/render_view.cc
===================================================================
--- chrome/renderer/render_view.cc (revision 57122)
+++ chrome/renderer/render_view.cc (working copy)
@@ -794,6 +794,8 @@
IPC_MESSAGE_HANDLER(ViewMsg_SetAccessibilityFocus, OnSetAccessibilityFocus)
IPC_MESSAGE_HANDLER(ViewMsg_AccessibilityDoDefaultAction,
OnAccessibilityDoDefaultAction)
+ IPC_MESSAGE_HANDLER(ViewMsg_AccessibilityObjectChildrenChange_ACK,
+ OnAccessibilityObjectChildrenChangeAck)
IPC_MESSAGE_HANDLER(ViewMsg_OpenFileSystemRequest_Complete,
OnOpenFileSystemRequestComplete)
@@ -1452,6 +1454,7 @@
accessibility_->clear();
accessibility_.reset();
}
+ accessibility_changes_.clear();
}
// Tell the embedding application that the title of the active page has changed
@@ -4266,6 +4269,7 @@
accessibility_->clear();
accessibility_.reset(WebAccessibilityCache::create());
accessibility_->initialize(webview());
+ accessibility_changes_.clear();
WebAccessibilityObject src_tree = webview()->accessibilityObject();
webkit_glue::WebAccessibility dst_tree(src_tree, accessibility_.get());
@@ -4295,6 +4299,19 @@
}
}
+void RenderView::OnAccessibilityObjectChildrenChangeAck() {
+ if (!accessibility_.get())
+ return;
+
+ if (!accessibility_changes_.empty()) {
+ Send(new ViewHostMsg_AccessibilityObjectChildrenChange(
+ routing_id_,
+ accessibility_changes_));
+ }
+
+ accessibility_changes_.clear();
+}
+
void RenderView::OnGetAllSavableResourceLinksForCurrentPage(
const GURL& page_url) {
// Prepare list to storage all savable resource links.
@@ -5253,6 +5270,21 @@
#endif
}
+void RenderView::didChangeAccessibilityObjectChildren(
+ const WebKit::WebAccessibilityObject& acc_obj) {
+ if (!accessibility_.get())
+ return;
+
+ if (accessibility_changes_.empty()) {
+ Send(new ViewHostMsg_AccessibilityObjectChildrenChange(
+ routing_id_,
+ std::vector<webkit_glue::WebAccessibility>()));
+ }
+
+ accessibility_changes_.push_back(
+ webkit_glue::WebAccessibility(acc_obj, accessibility_.get()));
+}
+
void RenderView::Print(WebFrame* frame, bool script_initiated) {
DCHECK(frame);
if (print_helper_.get() == NULL) {
« no previous file with comments | « chrome/renderer/render_view.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698