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

Unified Diff: chrome/renderer/render_view.cc

Issue 4057: Adds MSAA/IAccessible exposure of web content. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 12 years, 3 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: chrome/renderer/render_view.cc
===================================================================
--- chrome/renderer/render_view.cc (revision 2530)
+++ chrome/renderer/render_view.cc (working copy)
@@ -310,7 +310,8 @@
OnAllowDomAutomationBindings)
IPC_MESSAGE_HANDLER(ViewMsg_AllowBindings, OnAllowBindings)
IPC_MESSAGE_HANDLER(ViewMsg_SetDOMUIProperty, OnSetDOMUIProperty)
- IPC_MESSAGE_HANDLER(ViewMsg_DragSourceEndedOrMoved, OnDragSourceEndedOrMoved)
+ IPC_MESSAGE_HANDLER(ViewMsg_DragSourceEndedOrMoved,
+ OnDragSourceEndedOrMoved)
IPC_MESSAGE_HANDLER(ViewMsg_DragSourceSystemDragEnded,
OnDragSourceSystemDragEnded)
IPC_MESSAGE_HANDLER(ViewMsg_SetInitialFocus, OnSetInitialFocus)
@@ -328,6 +329,9 @@
IPC_MESSAGE_HANDLER(ViewMsg_GetSerializedHtmlDataForCurrentPageWithLocalLinks,
OnGetSerializedHtmlDataForCurrentPageWithLocalLinks)
IPC_MESSAGE_HANDLER(ViewMsg_GetApplicationInfo, OnGetApplicationInfo)
+ IPC_MESSAGE_HANDLER(ViewMsg_GetAccessibilityInfo, OnGetAccessibilityInfo)
+ IPC_MESSAGE_HANDLER(ViewMsg_ClearAccessibilityInfo,
+ OnClearAccessibilityInfo)
IPC_MESSAGE_HANDLER(ViewMsg_ShouldClose, OnMsgShouldClose)
IPC_MESSAGE_HANDLER(ViewMsg_ClosePage, OnClosePage)
IPC_MESSAGE_HANDLER(ViewMsg_ThemeChanged, OnThemeChanged)
@@ -1050,6 +1054,11 @@
// we don't want the transition type to persist.
if (extra_data)
extra_data->transition_type = PageTransition::LINK; // Just clear it.
+
+ if (glue_accessibility_.get()) {
+ // Clear accessibility info cache.
+ glue_accessibility_->ClearIAccessibleMap(-1, true);
+ }
}
// Tell the embedding application that the title of the active page has changed
@@ -1145,7 +1154,7 @@
NavigationGesture gesture) {
if (webview->GetMainFrame() == frame) {
navigation_gesture_ = gesture;
-
+
// Make sure redirect tracking state is clear for the new load.
completed_client_redirect_src_ = GURL();
}
@@ -2258,8 +2267,7 @@
}
void RenderView::OnAllowBindings(bool enable_dom_ui_bindings,
- bool enable_external_host_bindings)
-{
+ bool enable_external_host_bindings) {
enable_dom_ui_bindings_ = enable_dom_ui_bindings;
enable_external_host_bindings_ = enable_external_host_bindings;
}
@@ -2404,6 +2412,29 @@
history_forward_list_count_ = forward_list_count;
}
+void RenderView::OnGetAccessibilityInfo(
+ const ViewMsg_Accessibility_In_Params& in_params,
+ ViewHostMsg_Accessibility_Out_Params* out_params) {
+
+ if (!glue_accessibility_.get())
+ glue_accessibility_.reset(new GlueAccessibility());
+
+ if (!glue_accessibility_->
+ GetAccessibilityInfo(webview(), in_params, out_params)) {
+ return;
+ }
+}
+
+void RenderView::OnClearAccessibilityInfo(int iaccessible_id, bool clear_all) {
+ if (!glue_accessibility_.get()) {
+ // If accessibility is not activated, ignore clearing message.
+ return;
+ }
+
+ if (!glue_accessibility_->ClearIAccessibleMap(iaccessible_id, clear_all))
+ return;
+}
+
void RenderView::OnGetAllSavableResourceLinksForCurrentPage(
const GURL& page_url) {
// Prepare list to storage all savable resource links.

Powered by Google App Engine
This is Rietveld 408576698