diff options
Diffstat (limited to 'chrome/renderer/render_view.cc')
-rw-r--r-- | chrome/renderer/render_view.cc | 39 |
1 files changed, 35 insertions, 4 deletions
diff --git a/chrome/renderer/render_view.cc b/chrome/renderer/render_view.cc index 636fc54..af907c1 100644 --- a/chrome/renderer/render_view.cc +++ b/chrome/renderer/render_view.cc @@ -310,7 +310,8 @@ void RenderView::OnMessageReceived(const IPC::Message& message) { 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 @@ void RenderView::OnMessageReceived(const IPC::Message& message) { 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) @@ -1051,6 +1055,11 @@ void RenderView::UpdateURL(WebFrame* frame) { // 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 @@ -1146,7 +1155,7 @@ void RenderView::DidStartProvisionalLoadForFrame( 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(); } @@ -2260,8 +2269,7 @@ void RenderView::OnAllowDomAutomationBindings(bool allow_bindings) { } 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; } @@ -2406,6 +2414,29 @@ void RenderView::OnUpdateBackForwardListCount(int back_list_count, 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. |