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

Unified Diff: content/browser/renderer_host/render_widget_host_impl.cc

Issue 9939011: Add an accessibility mode for editable text fields only. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 9 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: content/browser/renderer_host/render_widget_host_impl.cc
diff --git a/content/browser/renderer_host/render_widget_host_impl.cc b/content/browser/renderer_host/render_widget_host_impl.cc
index 971ff8f6217cc25fe6c4a2aa74da086c4feb2fe9..4957bc3272ec18729c38a30010b8f524bbd9bd22 100644
--- a/content/browser/renderer_host/render_widget_host_impl.cc
+++ b/content/browser/renderer_host/render_widget_host_impl.cc
@@ -28,7 +28,6 @@
#include "content/common/gpu/gpu_messages.h"
#include "content/common/view_messages.h"
#include "content/port/browser/render_widget_host_view_port.h"
-#include "content/public/browser/browser_accessibility_state.h"
#include "content/public/browser/native_web_keyboard_event.h"
#include "content/public/browser/notification_service.h"
#include "content/public/browser/notification_types.h"
@@ -106,7 +105,6 @@ RenderWidgetHostImpl::RenderWidgetHostImpl(RenderProcessHost* process,
hung_renderer_delay_ms_(kHungRendererDelayMs),
process_(process),
routing_id_(routing_id),
- renderer_accessible_(false),
surface_id_(0),
is_loading_(false),
is_hidden_(false),
@@ -154,16 +152,6 @@ RenderWidgetHostImpl::RenderWidgetHostImpl(RenderProcessHost* process,
// Because the widget initializes as is_hidden_ == false,
// tell the process host that we're alive.
process_->WidgetRestored();
-
- // Enable accessibility if it was manually specified or if it was
- // auto-detected.
- if (CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kForceRendererAccessibility)) {
- BrowserAccessibilityState::GetInstance()->OnAccessibilityEnabledManually();
- EnableRendererAccessibility();
- } else if (BrowserAccessibilityState::GetInstance()->IsAccessibleBrowser()) {
- EnableRendererAccessibility();
- }
}
RenderWidgetHostImpl::~RenderWidgetHostImpl() {
@@ -1485,21 +1473,8 @@ void RenderWidgetHostImpl::Replace(const string16& word) {
Send(new ViewMsg_Replace(routing_id_, word));
}
-void RenderWidgetHostImpl::EnableRendererAccessibility() {
- if (renderer_accessible_)
- return;
-
- if (CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kDisableRendererAccessibility)) {
- return;
- }
-
- renderer_accessible_ = true;
-
- if (process_->HasConnection()) {
- // Renderer accessibility wasn't enabled on process launch. Enable it now.
- Send(new AccessibilityMsg_Enable(GetRoutingID()));
- }
+void RenderWidgetHostImpl::SetAccessibilityMode(AccessibilityMode mode) {
+ Send(new AccessibilityMsg_SetMode(routing_id_, mode));
}
void RenderWidgetHostImpl::SetIgnoreInputEvents(bool ignore_input_events) {

Powered by Google App Engine
This is Rietveld 408576698