summaryrefslogtreecommitdiffstats
path: root/content
diff options
context:
space:
mode:
Diffstat (limited to 'content')
-rw-r--r--content/browser/renderer_host/render_view_host.cc8
-rw-r--r--content/browser/renderer_host/render_view_host.h8
2 files changed, 16 insertions, 0 deletions
diff --git a/content/browser/renderer_host/render_view_host.cc b/content/browser/renderer_host/render_view_host.cc
index fe0f9f2..838c5dc 100644
--- a/content/browser/renderer_host/render_view_host.cc
+++ b/content/browser/renderer_host/render_view_host.cc
@@ -132,6 +132,7 @@ RenderViewHost::RenderViewHost(SiteInstance* instance,
sudden_termination_allowed_(false),
session_storage_namespace_(session_storage),
save_accessibility_tree_for_testing_(false),
+ send_accessibility_updated_notifications_(false),
render_view_termination_status_(base::TERMINATION_STATUS_STILL_RUNNING) {
if (!session_storage_namespace_) {
session_storage_namespace_ = new SessionStorageNamespace(
@@ -1463,6 +1464,13 @@ void RenderViewHost::OnAccessibilityNotifications(
}
}
+ if (send_accessibility_updated_notifications_) {
+ content::NotificationService::current()->Notify(
+ content::NOTIFICATION_RENDER_VIEW_HOST_ACCESSIBILITY_TREE_UPDATED,
+ content::Source<RenderViewHost>(this),
+ content::NotificationService::NoDetails());
+ }
+
Send(new AccessibilityMsg_Notifications_ACK(routing_id()));
}
diff --git a/content/browser/renderer_host/render_view_host.h b/content/browser/renderer_host/render_view_host.h
index 7bcbd85..ff7e572 100644
--- a/content/browser/renderer_host/render_view_host.h
+++ b/content/browser/renderer_host/render_view_host.h
@@ -397,6 +397,10 @@ class CONTENT_EXPORT RenderViewHost : public RenderWidgetHost {
save_accessibility_tree_for_testing_ = save;
}
+ void set_send_accessibility_updated_notifications(bool send) {
+ send_accessibility_updated_notifications_ = send;
+ }
+
const webkit_glue::WebAccessibility& accessibility_tree_for_testing() {
return accessibility_tree_;
}
@@ -685,6 +689,10 @@ class CONTENT_EXPORT RenderViewHost : public RenderWidgetHost {
// Whether the accessibility tree should be saved, for unit testing.
bool save_accessibility_tree_for_testing_;
+ // Whether accessibility notifications are sent for all WebKit notifications
+ // for unit testing.
+ bool send_accessibility_updated_notifications_;
+
// The most recently received accessibility tree - for unit testing only.
webkit_glue::WebAccessibility accessibility_tree_;