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

Side by Side 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/renderer_host/render_widget_host_impl.h" 5 #include "content/browser/renderer_host/render_widget_host_impl.h"
6 6
7 #include <math.h> 7 #include <math.h>
8 #include <set> 8 #include <set>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 is_loading_(false), 166 is_loading_(false),
167 is_hidden_(hidden), 167 is_hidden_(hidden),
168 is_fullscreen_(false), 168 is_fullscreen_(false),
169 is_accelerated_compositing_active_(false), 169 is_accelerated_compositing_active_(false),
170 repaint_ack_pending_(false), 170 repaint_ack_pending_(false),
171 resize_ack_pending_(false), 171 resize_ack_pending_(false),
172 screen_info_out_of_date_(false), 172 screen_info_out_of_date_(false),
173 overdraw_bottom_height_(0.f), 173 overdraw_bottom_height_(0.f),
174 should_auto_resize_(false), 174 should_auto_resize_(false),
175 waiting_for_screen_rects_ack_(false), 175 waiting_for_screen_rects_ack_(false),
176 accessibility_mode_(AccessibilityModeOff), 176 accessibility_mode_(0),
177 needs_repainting_on_restore_(false), 177 needs_repainting_on_restore_(false),
178 is_unresponsive_(false), 178 is_unresponsive_(false),
179 in_flight_event_count_(0), 179 in_flight_event_count_(0),
180 in_get_backing_store_(false), 180 in_get_backing_store_(false),
181 abort_get_backing_store_(false), 181 abort_get_backing_store_(false),
182 view_being_painted_(false), 182 view_being_painted_(false),
183 ignore_input_events_(false), 183 ignore_input_events_(false),
184 input_method_active_(false), 184 input_method_active_(false),
185 text_direction_updated_(false), 185 text_direction_updated_(false),
186 text_direction_(blink::WebTextDirectionLeftToRight), 186 text_direction_(blink::WebTextDirectionLeftToRight),
(...skipping 725 matching lines...) Expand 10 before | Expand all | Expand 10 after
912 base::TimeDelta::FromMilliseconds(hung_renderer_delay_ms_)); 912 base::TimeDelta::FromMilliseconds(hung_renderer_delay_ms_));
913 } 913 }
914 914
915 void RenderWidgetHostImpl::StopHangMonitorTimeout() { 915 void RenderWidgetHostImpl::StopHangMonitorTimeout() {
916 if (hang_monitor_timeout_) 916 if (hang_monitor_timeout_)
917 hang_monitor_timeout_->Stop(); 917 hang_monitor_timeout_->Stop();
918 RendererIsResponsive(); 918 RendererIsResponsive();
919 } 919 }
920 920
921 void RenderWidgetHostImpl::EnableFullAccessibilityMode() { 921 void RenderWidgetHostImpl::EnableFullAccessibilityMode() {
922 SetAccessibilityMode(AccessibilityModeComplete); 922 SetAccessibilityMode(AccessibilityModeFlagRenderer |
923 AccessibilityModeFlagPlatform);
923 } 924 }
924 925
925 void RenderWidgetHostImpl::ForwardMouseEvent(const WebMouseEvent& mouse_event) { 926 void RenderWidgetHostImpl::ForwardMouseEvent(const WebMouseEvent& mouse_event) {
926 ForwardMouseEventWithLatencyInfo(MouseEventWithLatencyInfo( 927 ForwardMouseEventWithLatencyInfo(MouseEventWithLatencyInfo(
927 mouse_event, CreateRWHLatencyInfoIfNotExist(NULL, mouse_event.type))); 928 mouse_event, CreateRWHLatencyInfoIfNotExist(NULL, mouse_event.type)));
928 } 929 }
929 930
930 void RenderWidgetHostImpl::ForwardMouseEventWithLatencyInfo( 931 void RenderWidgetHostImpl::ForwardMouseEventWithLatencyInfo(
931 const MouseEventWithLatencyInfo& mouse_event) { 932 const MouseEventWithLatencyInfo& mouse_event) {
932 TRACE_EVENT2("input", "RenderWidgetHostImpl::ForwardMouseEvent", 933 TRACE_EVENT2("input", "RenderWidgetHostImpl::ForwardMouseEvent",
(...skipping 1158 matching lines...) Expand 10 before | Expand all | Expand 10 after
2091 2092
2092 void RenderWidgetHostImpl::SetBackground(const SkBitmap& background) { 2093 void RenderWidgetHostImpl::SetBackground(const SkBitmap& background) {
2093 Send(new ViewMsg_SetBackground(GetRoutingID(), background)); 2094 Send(new ViewMsg_SetBackground(GetRoutingID(), background));
2094 } 2095 }
2095 2096
2096 void RenderWidgetHostImpl::SetEditCommandsForNextKeyEvent( 2097 void RenderWidgetHostImpl::SetEditCommandsForNextKeyEvent(
2097 const std::vector<EditCommand>& commands) { 2098 const std::vector<EditCommand>& commands) {
2098 Send(new InputMsg_SetEditCommandsForNextKeyEvent(GetRoutingID(), commands)); 2099 Send(new InputMsg_SetEditCommandsForNextKeyEvent(GetRoutingID(), commands));
2099 } 2100 }
2100 2101
2101 void RenderWidgetHostImpl::SetAccessibilityMode(AccessibilityMode mode) { 2102 void RenderWidgetHostImpl::SetAccessibilityMode(unsigned int mode) {
2102 accessibility_mode_ = mode; 2103 accessibility_mode_ = mode;
2103 Send(new ViewMsg_SetAccessibilityMode(GetRoutingID(), mode)); 2104 Send(new ViewMsg_SetAccessibilityMode(GetRoutingID(), mode));
2104 } 2105 }
2105 2106
2107 void RenderWidgetHostImpl::SetRendererAccessibilityMode(bool on) {
2108 if ((accessibility_mode_ & AccessibilityModeFlagRenderer) == on)
David Tseng 2014/01/23 18:44:19 Ditto.
aboxhall 2014/01/27 18:03:15 Fixed as previously.
2109 return;
2110 if (on)
2111 accessibility_mode_ |= AccessibilityModeFlagRenderer;
2112 else
2113 accessibility_mode_ &= (~AccessibilityModeFlagRenderer);
2114 Send(new ViewMsg_SetAccessibilityMode(GetRoutingID(), accessibility_mode_));
2115 }
2116
2106 void RenderWidgetHostImpl::AccessibilityDoDefaultAction(int object_id) { 2117 void RenderWidgetHostImpl::AccessibilityDoDefaultAction(int object_id) {
2107 Send(new AccessibilityMsg_DoDefaultAction(GetRoutingID(), object_id)); 2118 Send(new AccessibilityMsg_DoDefaultAction(GetRoutingID(), object_id));
2108 } 2119 }
2109 2120
2110 void RenderWidgetHostImpl::AccessibilitySetFocus(int object_id) { 2121 void RenderWidgetHostImpl::AccessibilitySetFocus(int object_id) {
2111 Send(new AccessibilityMsg_SetFocus(GetRoutingID(), object_id)); 2122 Send(new AccessibilityMsg_SetFocus(GetRoutingID(), object_id));
2112 } 2123 }
2113 2124
2114 void RenderWidgetHostImpl::AccessibilityScrollToMakeVisible( 2125 void RenderWidgetHostImpl::AccessibilityScrollToMakeVisible(
2115 int acc_obj_id, gfx::Rect subfocus) { 2126 int acc_obj_id, gfx::Rect subfocus) {
(...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after
2468 continue; 2479 continue;
2469 } 2480 }
2470 RenderWidgetHostImpl* rwhi = RenderWidgetHostImpl::From(rwh); 2481 RenderWidgetHostImpl* rwhi = RenderWidgetHostImpl::From(rwh);
2471 if (rwhi_set.insert(rwhi).second) 2482 if (rwhi_set.insert(rwhi).second)
2472 rwhi->FrameSwapped(latency_info); 2483 rwhi->FrameSwapped(latency_info);
2473 } 2484 }
2474 } 2485 }
2475 } 2486 }
2476 2487
2477 } // namespace content 2488 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698