Index: content/browser/renderer_host/render_view_host_impl.cc |
diff --git a/content/browser/renderer_host/render_view_host_impl.cc b/content/browser/renderer_host/render_view_host_impl.cc |
index 73afc7bc39308aebd329833f6b6fd01b5c06644a..06b993c81bcb65ae77d1f176c43db1e4cea1d67d 100644 |
--- a/content/browser/renderer_host/render_view_host_impl.cc |
+++ b/content/browser/renderer_host/render_view_host_impl.cc |
@@ -23,7 +23,6 @@ |
#include "base/time/time.h" |
#include "base/values.h" |
#include "cc/base/switches.h" |
-#include "content/browser/accessibility/browser_accessibility_manager.h" |
#include "content/browser/child_process_security_policy_impl.h" |
#include "content/browser/cross_site_request_manager.h" |
#include "content/browser/dom_storage/session_storage_namespace_impl.h" |
@@ -41,7 +40,6 @@ |
#include "content/browser/renderer_host/render_view_host_delegate.h" |
#include "content/browser/renderer_host/render_view_host_delegate_view.h" |
#include "content/browser/renderer_host/render_widget_host_view_base.h" |
-#include "content/common/accessibility_messages.h" |
#include "content/common/browser_plugin/browser_plugin_messages.h" |
#include "content/common/content_switches_internal.h" |
#include "content/common/drag_messages.h" |
@@ -76,7 +74,6 @@ |
#include "net/base/network_change_notifier.h" |
#include "net/url_request/url_request_context_getter.h" |
#include "third_party/skia/include/core/SkBitmap.h" |
-#include "ui/accessibility/ax_tree.h" |
#include "ui/base/touch/touch_device.h" |
#include "ui/base/touch/touch_enabled.h" |
#include "ui/base/ui_base_switches.h" |
@@ -308,7 +305,6 @@ bool RenderViewHostImpl::CreateRenderView( |
params.window_was_created_with_opener = window_was_created_with_opener; |
params.next_page_id = next_page_id; |
GetWebScreenInfo(¶ms.screen_info); |
- params.accessibility_mode = accessibility_mode(); |
Send(new ViewMsg_New(params)); |
@@ -975,9 +971,6 @@ bool RenderViewHostImpl::OnMessageReceived(const IPC::Message& msg) { |
IPC_MESSAGE_HANDLER(ViewHostMsg_HidePopup, OnHidePopup) |
#endif |
IPC_MESSAGE_HANDLER(ViewHostMsg_RunFileChooser, OnRunFileChooser) |
- IPC_MESSAGE_HANDLER(AccessibilityHostMsg_Events, OnAccessibilityEvents) |
- IPC_MESSAGE_HANDLER(AccessibilityHostMsg_LocationChanges, |
- OnAccessibilityLocationChanges) |
IPC_MESSAGE_HANDLER(ViewHostMsg_FocusedNodeTouched, OnFocusedNodeTouched) |
// Have the super handle all other messages. |
IPC_MESSAGE_UNHANDLED( |
@@ -1438,11 +1431,6 @@ void RenderViewHostImpl::DisownOpener() { |
Send(new ViewMsg_DisownOpener(GetRoutingID())); |
} |
-void RenderViewHostImpl::SetAccessibilityCallbackForTesting( |
- const base::Callback<void(ui::AXEvent, int)>& callback) { |
- accessibility_testing_callback_ = callback; |
-} |
- |
void RenderViewHostImpl::UpdateWebkitPreferences(const WebPreferences& prefs) { |
web_preferences_.reset(new WebPreferences(prefs)); |
Send(new ViewMsg_UpdateWebPreferences(GetRoutingID(), prefs)); |
@@ -1513,67 +1501,6 @@ void RenderViewHostImpl::NotifyMoveOrResizeStarted() { |
Send(new ViewMsg_MoveOrResizeStarted(GetRoutingID())); |
} |
-void RenderViewHostImpl::OnAccessibilityEvents( |
- const std::vector<AccessibilityHostMsg_EventParams>& params) { |
- if ((accessibility_mode() != AccessibilityModeOff) && view_ && |
- IsRVHStateActive(rvh_state_)) { |
- if (accessibility_mode() & AccessibilityModeFlagPlatform) { |
- view_->CreateBrowserAccessibilityManagerIfNeeded(); |
- BrowserAccessibilityManager* manager = |
- view_->GetBrowserAccessibilityManager(); |
- if (manager) |
- manager->OnAccessibilityEvents(params); |
- } |
- |
- std::vector<AXEventNotificationDetails> details; |
- for (unsigned int i = 0; i < params.size(); ++i) { |
- const AccessibilityHostMsg_EventParams& param = params[i]; |
- AXEventNotificationDetails detail(param.update.node_id_to_clear, |
- param.update.nodes, |
- param.event_type, |
- param.id, |
- GetProcess()->GetID(), |
- GetRoutingID()); |
- details.push_back(detail); |
- } |
- |
- delegate_->AccessibilityEventReceived(details); |
- } |
- |
- // Always send an ACK or the renderer can be in a bad state. |
- Send(new AccessibilityMsg_Events_ACK(GetRoutingID())); |
- |
- // The rest of this code is just for testing; bail out if we're not |
- // in that mode. |
- if (accessibility_testing_callback_.is_null()) |
- return; |
- |
- for (unsigned i = 0; i < params.size(); i++) { |
- const AccessibilityHostMsg_EventParams& param = params[i]; |
- if (static_cast<int>(param.event_type) < 0) |
- continue; |
- if (!ax_tree_) |
- ax_tree_.reset(new ui::AXTree(param.update)); |
- else |
- CHECK(ax_tree_->Unserialize(param.update)) << ax_tree_->error(); |
- accessibility_testing_callback_.Run(param.event_type, param.id); |
- } |
-} |
- |
-void RenderViewHostImpl::OnAccessibilityLocationChanges( |
- const std::vector<AccessibilityHostMsg_LocationChangeParams>& params) { |
- if (view_ && IsRVHStateActive(rvh_state_)) { |
- if (accessibility_mode() & AccessibilityModeFlagPlatform) { |
- view_->CreateBrowserAccessibilityManagerIfNeeded(); |
- BrowserAccessibilityManager* manager = |
- view_->GetBrowserAccessibilityManager(); |
- if (manager) |
- manager->OnLocationChanges(params); |
- } |
- // TODO(aboxhall): send location change events to web contents observers too |
- } |
-} |
- |
void RenderViewHostImpl::OnDidZoomURL(double zoom_level, |
const GURL& url) { |
HostZoomMapImpl* host_zoom_map = static_cast<HostZoomMapImpl*>( |