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

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: Addressed comments and rebased. Created 8 years, 8 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 7476989ec27f02a40b198ad4f5fde1eaa86d9125..eb67f128982dd8fbf38abdd6cea8268eb5264fba 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() {
@@ -667,6 +655,10 @@ void RenderWidgetHostImpl::StopHangMonitorTimeout() {
// started again shortly, which happens to be the common use case.
}
+void RenderWidgetHostImpl::EnableFullAccessibilityMode() {
David Tseng 2012/04/09 17:57:34 It looks like this is only referenced once; do we
dmazzoni 2012/04/09 18:51:47 The reason for this is because the AccessibilityMo
+ SetAccessibilityMode(AccessibilityModeComplete);
+}
+
void RenderWidgetHostImpl::ForwardMouseEvent(const WebMouseEvent& mouse_event) {
TRACE_EVENT2("renderer_host", "RenderWidgetHostImpl::ForwardMouseEvent",
"x", mouse_event.x, "y", mouse_event.y);
@@ -1485,23 +1477,6 @@ 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::SetIgnoreInputEvents(bool ignore_input_events) {
ignore_input_events_ = ignore_input_events;
}
@@ -1577,6 +1552,10 @@ void RenderWidgetHostImpl::SetEditCommandsForNextKeyEvent(
Send(new ViewMsg_SetEditCommandsForNextKeyEvent(GetRoutingID(), commands));
}
+void RenderWidgetHostImpl::SetAccessibilityMode(AccessibilityMode mode) {
+ Send(new AccessibilityMsg_SetMode(routing_id_, mode));
+}
+
void RenderWidgetHostImpl::AccessibilityDoDefaultAction(int object_id) {
Send(new AccessibilityMsg_DoDefaultAction(GetRoutingID(), object_id));
}
« no previous file with comments | « content/browser/renderer_host/render_widget_host_impl.h ('k') | content/browser/renderer_host/render_widget_host_view_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698