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

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

Issue 145283003: Switch AccessibilityMode to be a bitmap (Closed) Base URL: https://chromium.googlesource.com/chromium/src@enable
Patch Set: Created 6 years, 11 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 05bcf4822cf398541dda22725d2e737c9a62ffb5..7d6f7f99eec9ea0857f57255a432782d33f5db08 100644
--- a/content/browser/renderer_host/render_widget_host_impl.cc
+++ b/content/browser/renderer_host/render_widget_host_impl.cc
@@ -173,7 +173,7 @@ RenderWidgetHostImpl::RenderWidgetHostImpl(RenderWidgetHostDelegate* delegate,
overdraw_bottom_height_(0.f),
should_auto_resize_(false),
waiting_for_screen_rects_ack_(false),
- accessibility_mode_(AccessibilityModeOff),
+ accessibility_mode_(0),
needs_repainting_on_restore_(false),
is_unresponsive_(false),
in_flight_event_count_(0),
@@ -919,7 +919,8 @@ void RenderWidgetHostImpl::StopHangMonitorTimeout() {
}
void RenderWidgetHostImpl::EnableFullAccessibilityMode() {
- SetAccessibilityMode(AccessibilityModeComplete);
+ SetAccessibilityMode(AccessibilityModeFlagRenderer |
+ AccessibilityModeFlagPlatform);
}
void RenderWidgetHostImpl::ForwardMouseEvent(const WebMouseEvent& mouse_event) {
@@ -2098,11 +2099,21 @@ void RenderWidgetHostImpl::SetEditCommandsForNextKeyEvent(
Send(new InputMsg_SetEditCommandsForNextKeyEvent(GetRoutingID(), commands));
}
-void RenderWidgetHostImpl::SetAccessibilityMode(AccessibilityMode mode) {
+void RenderWidgetHostImpl::SetAccessibilityMode(unsigned int mode) {
accessibility_mode_ = mode;
Send(new ViewMsg_SetAccessibilityMode(GetRoutingID(), mode));
}
+void RenderWidgetHostImpl::SetRendererAccessibilityMode(bool on) {
+ if ((accessibility_mode_ & AccessibilityModeFlagRenderer) == on)
David Tseng 2014/01/23 18:44:19 Ditto.
aboxhall 2014/01/27 18:03:15 Fixed as previously.
+ return;
+ if (on)
+ accessibility_mode_ |= AccessibilityModeFlagRenderer;
+ else
+ accessibility_mode_ &= (~AccessibilityModeFlagRenderer);
+ Send(new ViewMsg_SetAccessibilityMode(GetRoutingID(), accessibility_mode_));
+}
+
void RenderWidgetHostImpl::AccessibilityDoDefaultAction(int object_id) {
Send(new AccessibilityMsg_DoDefaultAction(GetRoutingID(), object_id));
}

Powered by Google App Engine
This is Rietveld 408576698