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

Side by Side Diff: chrome/browser/chromeos/accessibility/accessibility_manager.cc

Issue 2802783002: List all a11y features in a11y detailed view in ash system menu (Closed)
Patch Set: Address the comments on PS#1 Created 3 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 "chrome/browser/chromeos/accessibility/accessibility_manager.h" 5 #include "chrome/browser/chromeos/accessibility/accessibility_manager.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 27 matching lines...) Expand all
38 #include "chrome/browser/browser_process.h" 38 #include "chrome/browser/browser_process.h"
39 #include "chrome/browser/chrome_notification_types.h" 39 #include "chrome/browser/chrome_notification_types.h"
40 #include "chrome/browser/chromeos/accessibility/accessibility_extension_loader.h " 40 #include "chrome/browser/chromeos/accessibility/accessibility_extension_loader.h "
41 #include "chrome/browser/chromeos/accessibility/accessibility_highlight_manager. h" 41 #include "chrome/browser/chromeos/accessibility/accessibility_highlight_manager. h"
42 #include "chrome/browser/chromeos/accessibility/magnification_manager.h" 42 #include "chrome/browser/chromeos/accessibility/magnification_manager.h"
43 #include "chrome/browser/chromeos/accessibility/select_to_speak_event_handler.h" 43 #include "chrome/browser/chromeos/accessibility/select_to_speak_event_handler.h"
44 #include "chrome/browser/chromeos/accessibility/switch_access_event_handler.h" 44 #include "chrome/browser/chromeos/accessibility/switch_access_event_handler.h"
45 #include "chrome/browser/chromeos/app_mode/kiosk_app_manager.h" 45 #include "chrome/browser/chromeos/app_mode/kiosk_app_manager.h"
46 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h" 46 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h"
47 #include "chrome/browser/chromeos/profiles/profile_helper.h" 47 #include "chrome/browser/chromeos/profiles/profile_helper.h"
48 #include "chrome/browser/chromeos/system/input_device_settings.h"
48 #include "chrome/browser/chromeos/ui/accessibility_focus_ring_controller.h" 49 #include "chrome/browser/chromeos/ui/accessibility_focus_ring_controller.h"
49 #include "chrome/browser/extensions/api/braille_display_private/stub_braille_con troller.h" 50 #include "chrome/browser/extensions/api/braille_display_private/stub_braille_con troller.h"
50 #include "chrome/browser/extensions/extension_service.h" 51 #include "chrome/browser/extensions/extension_service.h"
51 #include "chrome/browser/prefs/incognito_mode_prefs.h" 52 #include "chrome/browser/prefs/incognito_mode_prefs.h"
52 #include "chrome/browser/profiles/profile.h" 53 #include "chrome/browser/profiles/profile.h"
53 #include "chrome/browser/profiles/profile_manager.h" 54 #include "chrome/browser/profiles/profile_manager.h"
54 #include "chrome/browser/ui/ash/ash_util.h" 55 #include "chrome/browser/ui/ash/ash_util.h"
55 #include "chrome/common/chrome_paths.h" 56 #include "chrome/common/chrome_paths.h"
56 #include "chrome/common/extensions/api/accessibility_private.h" 57 #include "chrome/common/extensions/api/accessibility_private.h"
57 #include "chrome/common/extensions/extension_constants.h" 58 #include "chrome/common/extensions/extension_constants.h"
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
229 } 230 }
230 231
231 // static 232 // static
232 AccessibilityManager* AccessibilityManager::Get() { 233 AccessibilityManager* AccessibilityManager::Get() {
233 return g_accessibility_manager; 234 return g_accessibility_manager;
234 } 235 }
235 236
236 AccessibilityManager::AccessibilityManager() 237 AccessibilityManager::AccessibilityManager()
237 : profile_(NULL), 238 : profile_(NULL),
238 large_cursor_pref_handler_(prefs::kAccessibilityLargeCursorEnabled), 239 large_cursor_pref_handler_(prefs::kAccessibilityLargeCursorEnabled),
240 sticky_keys_pref_handler_(prefs::kAccessibilityStickyKeysEnabled),
239 spoken_feedback_pref_handler_(prefs::kAccessibilitySpokenFeedbackEnabled), 241 spoken_feedback_pref_handler_(prefs::kAccessibilitySpokenFeedbackEnabled),
240 high_contrast_pref_handler_(prefs::kAccessibilityHighContrastEnabled), 242 high_contrast_pref_handler_(prefs::kAccessibilityHighContrastEnabled),
241 autoclick_pref_handler_(prefs::kAccessibilityAutoclickEnabled), 243 autoclick_pref_handler_(prefs::kAccessibilityAutoclickEnabled),
242 autoclick_delay_pref_handler_(prefs::kAccessibilityAutoclickDelayMs), 244 autoclick_delay_pref_handler_(prefs::kAccessibilityAutoclickDelayMs),
243 virtual_keyboard_pref_handler_( 245 virtual_keyboard_pref_handler_(
244 prefs::kAccessibilityVirtualKeyboardEnabled), 246 prefs::kAccessibilityVirtualKeyboardEnabled),
245 mono_audio_pref_handler_(prefs::kAccessibilityMonoAudioEnabled), 247 mono_audio_pref_handler_(prefs::kAccessibilityMonoAudioEnabled),
246 caret_highlight_pref_handler_(prefs::kAccessibilityCaretHighlightEnabled), 248 caret_highlight_pref_handler_(prefs::kAccessibilityCaretHighlightEnabled),
247 cursor_highlight_pref_handler_( 249 cursor_highlight_pref_handler_(
248 prefs::kAccessibilityCursorHighlightEnabled), 250 prefs::kAccessibilityCursorHighlightEnabled),
249 focus_highlight_pref_handler_(prefs::kAccessibilityFocusHighlightEnabled), 251 focus_highlight_pref_handler_(prefs::kAccessibilityFocusHighlightEnabled),
252 tap_dragging_pref_handler_(prefs::kTapDraggingEnabled),
250 select_to_speak_pref_handler_(prefs::kAccessibilitySelectToSpeakEnabled), 253 select_to_speak_pref_handler_(prefs::kAccessibilitySelectToSpeakEnabled),
251 switch_access_pref_handler_(prefs::kAccessibilitySwitchAccessEnabled), 254 switch_access_pref_handler_(prefs::kAccessibilitySwitchAccessEnabled),
252 large_cursor_enabled_(false), 255 large_cursor_enabled_(false),
253 large_cursor_size_in_dip_(ash::kDefaultLargeCursorSize), 256 large_cursor_size_in_dip_(ash::kDefaultLargeCursorSize),
254 sticky_keys_enabled_(false), 257 sticky_keys_enabled_(false),
255 spoken_feedback_enabled_(false), 258 spoken_feedback_enabled_(false),
256 high_contrast_enabled_(false), 259 high_contrast_enabled_(false),
257 autoclick_enabled_(false), 260 autoclick_enabled_(false),
258 autoclick_delay_ms_(ash::AutoclickController::GetDefaultAutoclickDelay()), 261 autoclick_delay_ms_(ash::AutoclickController::GetDefaultAutoclickDelay()),
259 virtual_keyboard_enabled_(false), 262 virtual_keyboard_enabled_(false),
260 mono_audio_enabled_(false), 263 mono_audio_enabled_(false),
261 caret_highlight_enabled_(false), 264 caret_highlight_enabled_(false),
262 cursor_highlight_enabled_(false), 265 cursor_highlight_enabled_(false),
263 focus_highlight_enabled_(false), 266 focus_highlight_enabled_(false),
267 tap_dragging_enabled_(false),
264 select_to_speak_enabled_(false), 268 select_to_speak_enabled_(false),
265 switch_access_enabled_(false), 269 switch_access_enabled_(false),
266 spoken_feedback_notification_(ash::A11Y_NOTIFICATION_NONE), 270 spoken_feedback_notification_(ash::A11Y_NOTIFICATION_NONE),
267 system_sounds_enabled_(false), 271 system_sounds_enabled_(false),
268 braille_display_connected_(false), 272 braille_display_connected_(false),
269 scoped_braille_observer_(this), 273 scoped_braille_observer_(this),
270 braille_ime_current_(false), 274 braille_ime_current_(false),
271 chromevox_panel_(nullptr), 275 chromevox_panel_(nullptr),
272 extension_registry_observer_(this), 276 extension_registry_observer_(this),
273 weak_ptr_factory_(this) { 277 weak_ptr_factory_(this) {
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
352 pref_service->GetBoolean(prefs::kAccessibilityLargeCursorEnabled) || 356 pref_service->GetBoolean(prefs::kAccessibilityLargeCursorEnabled) ||
353 pref_service->GetBoolean(prefs::kAccessibilitySpokenFeedbackEnabled) || 357 pref_service->GetBoolean(prefs::kAccessibilitySpokenFeedbackEnabled) ||
354 pref_service->GetBoolean(prefs::kAccessibilityHighContrastEnabled) || 358 pref_service->GetBoolean(prefs::kAccessibilityHighContrastEnabled) ||
355 pref_service->GetBoolean(prefs::kAccessibilityAutoclickEnabled) || 359 pref_service->GetBoolean(prefs::kAccessibilityAutoclickEnabled) ||
356 pref_service->GetBoolean(prefs::kShouldAlwaysShowAccessibilityMenu) || 360 pref_service->GetBoolean(prefs::kShouldAlwaysShowAccessibilityMenu) ||
357 pref_service->GetBoolean(prefs::kAccessibilityScreenMagnifierEnabled) || 361 pref_service->GetBoolean(prefs::kAccessibilityScreenMagnifierEnabled) ||
358 pref_service->GetBoolean(prefs::kAccessibilityVirtualKeyboardEnabled) || 362 pref_service->GetBoolean(prefs::kAccessibilityVirtualKeyboardEnabled) ||
359 pref_service->GetBoolean(prefs::kAccessibilityMonoAudioEnabled) || 363 pref_service->GetBoolean(prefs::kAccessibilityMonoAudioEnabled) ||
360 pref_service->GetBoolean(prefs::kAccessibilityCaretHighlightEnabled) || 364 pref_service->GetBoolean(prefs::kAccessibilityCaretHighlightEnabled) ||
361 pref_service->GetBoolean(prefs::kAccessibilityCursorHighlightEnabled) || 365 pref_service->GetBoolean(prefs::kAccessibilityCursorHighlightEnabled) ||
362 pref_service->GetBoolean(prefs::kAccessibilityFocusHighlightEnabled)) 366 pref_service->GetBoolean(prefs::kAccessibilityFocusHighlightEnabled) ||
367 pref_service->GetBoolean(prefs::kTapDraggingEnabled))
363 return true; 368 return true;
364 } 369 }
365 return false; 370 return false;
366 } 371 }
367 372
368 bool AccessibilityManager::ShouldEnableCursorCompositing() { 373 bool AccessibilityManager::ShouldEnableCursorCompositing() {
369 if (!profile_) 374 if (!profile_)
370 return false; 375 return false;
371 PrefService* pref_service = profile_->GetPrefs(); 376 PrefService* pref_service = profile_->GetPrefs();
372 // Enable cursor compositing when one or more of the listed accessibility 377 // Enable cursor compositing when one or more of the listed accessibility
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
450 if (!profile_) 455 if (!profile_)
451 return; 456 return;
452 457
453 const bool enabled = 458 const bool enabled =
454 profile_->GetPrefs()->GetBoolean(prefs::kAccessibilityStickyKeysEnabled); 459 profile_->GetPrefs()->GetBoolean(prefs::kAccessibilityStickyKeysEnabled);
455 460
456 if (sticky_keys_enabled_ == enabled) 461 if (sticky_keys_enabled_ == enabled)
457 return; 462 return;
458 463
459 sticky_keys_enabled_ = enabled; 464 sticky_keys_enabled_ = enabled;
465
466 AccessibilityStatusEventDetails details(ACCESSIBILITY_TOGGLE_STICKY_KEYS,
467 enabled, ash::A11Y_NOTIFICATION_NONE);
468 NotifyAccessibilityStatusChanged(details);
460 ash::Shell::Get()->sticky_keys_controller()->Enable(enabled); 469 ash::Shell::Get()->sticky_keys_controller()->Enable(enabled);
461 } 470 }
462 471
463 void AccessibilityManager::EnableSpokenFeedback( 472 void AccessibilityManager::EnableSpokenFeedback(
464 bool enabled, 473 bool enabled,
465 ash::AccessibilityNotificationVisibility notify) { 474 ash::AccessibilityNotificationVisibility notify) {
466 if (!profile_) 475 if (!profile_)
467 return; 476 return;
468 ash::WmShell::Get()->RecordUserMetricsAction( 477 ash::WmShell::Get()->RecordUserMetricsAction(
469 enabled ? ash::UMA_STATUS_AREA_ENABLE_SPOKEN_FEEDBACK 478 enabled ? ash::UMA_STATUS_AREA_ENABLE_SPOKEN_FEEDBACK
(...skipping 425 matching lines...) Expand 10 before | Expand all | Expand 10 after
895 if (focus_highlight_enabled_ == enabled) 904 if (focus_highlight_enabled_ == enabled)
896 return; 905 return;
897 focus_highlight_enabled_ = enabled; 906 focus_highlight_enabled_ = enabled;
898 907
899 AccessibilityStatusEventDetails details(ACCESSIBILITY_TOGGLE_FOCUS_HIGHLIGHT, 908 AccessibilityStatusEventDetails details(ACCESSIBILITY_TOGGLE_FOCUS_HIGHLIGHT,
900 enabled, ash::A11Y_NOTIFICATION_NONE); 909 enabled, ash::A11Y_NOTIFICATION_NONE);
901 NotifyAccessibilityStatusChanged(details); 910 NotifyAccessibilityStatusChanged(details);
902 UpdateAccessibilityHighlightingFromPrefs(); 911 UpdateAccessibilityHighlightingFromPrefs();
903 } 912 }
904 913
914 void AccessibilityManager::EnableTapDragging(bool enabled) {
915 if (!profile_)
916 return;
917
918 PrefService* pref_service = profile_->GetPrefs();
919 pref_service->SetBoolean(prefs::kTapDraggingEnabled, enabled);
920 pref_service->CommitPendingWrite();
921 }
922
923 bool AccessibilityManager::IsTapDraggingEnabled() {
924 return tap_dragging_enabled_;
925 }
926
927 void AccessibilityManager::UpdateTapDraggingFromPref() {
928 if (!profile_)
929 return;
930
931 const bool enabled =
932 profile_->GetPrefs()->GetBoolean(prefs::kTapDraggingEnabled);
933
934 if (tap_dragging_enabled_ == enabled)
935 return;
936 tap_dragging_enabled_ = enabled;
937
938 AccessibilityStatusEventDetails details(ACCESSIBILITY_TOGGLE_TAP_DRAGGING,
939 enabled, ash::A11Y_NOTIFICATION_NONE);
940 NotifyAccessibilityStatusChanged(details);
941
942 system::TouchpadSettings touchpad_settings;
943 touchpad_settings.SetTapDragging(enabled);
944 }
945
905 void AccessibilityManager::SetSelectToSpeakEnabled(bool enabled) { 946 void AccessibilityManager::SetSelectToSpeakEnabled(bool enabled) {
906 if (!profile_) 947 if (!profile_)
907 return; 948 return;
908 949
909 PrefService* pref_service = profile_->GetPrefs(); 950 PrefService* pref_service = profile_->GetPrefs();
910 pref_service->SetBoolean(prefs::kAccessibilitySelectToSpeakEnabled, enabled); 951 pref_service->SetBoolean(prefs::kAccessibilitySelectToSpeakEnabled, enabled);
911 pref_service->CommitPendingWrite(); 952 pref_service->CommitPendingWrite();
912 } 953 }
913 954
914 bool AccessibilityManager::IsSelectToSpeakEnabled() const { 955 bool AccessibilityManager::IsSelectToSpeakEnabled() const {
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
1118 base::Unretained(this))); 1159 base::Unretained(this)));
1119 pref_change_registrar_->Add( 1160 pref_change_registrar_->Add(
1120 prefs::kAccessibilityCursorHighlightEnabled, 1161 prefs::kAccessibilityCursorHighlightEnabled,
1121 base::Bind(&AccessibilityManager::UpdateCursorHighlightFromPref, 1162 base::Bind(&AccessibilityManager::UpdateCursorHighlightFromPref,
1122 base::Unretained(this))); 1163 base::Unretained(this)));
1123 pref_change_registrar_->Add( 1164 pref_change_registrar_->Add(
1124 prefs::kAccessibilityFocusHighlightEnabled, 1165 prefs::kAccessibilityFocusHighlightEnabled,
1125 base::Bind(&AccessibilityManager::UpdateFocusHighlightFromPref, 1166 base::Bind(&AccessibilityManager::UpdateFocusHighlightFromPref,
1126 base::Unretained(this))); 1167 base::Unretained(this)));
1127 pref_change_registrar_->Add( 1168 pref_change_registrar_->Add(
1169 prefs::kTapDraggingEnabled,
1170 base::Bind(&AccessibilityManager::UpdateTapDraggingFromPref,
1171 base::Unretained(this)));
1172 pref_change_registrar_->Add(
1128 prefs::kAccessibilitySelectToSpeakEnabled, 1173 prefs::kAccessibilitySelectToSpeakEnabled,
1129 base::Bind(&AccessibilityManager::UpdateSelectToSpeakFromPref, 1174 base::Bind(&AccessibilityManager::UpdateSelectToSpeakFromPref,
1130 base::Unretained(this))); 1175 base::Unretained(this)));
1131 pref_change_registrar_->Add( 1176 pref_change_registrar_->Add(
1132 prefs::kAccessibilitySwitchAccessEnabled, 1177 prefs::kAccessibilitySwitchAccessEnabled,
1133 base::Bind(&AccessibilityManager::UpdateSwitchAccessFromPref, 1178 base::Bind(&AccessibilityManager::UpdateSwitchAccessFromPref,
1134 base::Unretained(this))); 1179 base::Unretained(this)));
1135 1180
1136 local_state_pref_change_registrar_.reset(new PrefChangeRegistrar); 1181 local_state_pref_change_registrar_.reset(new PrefChangeRegistrar);
1137 local_state_pref_change_registrar_->Init(g_browser_process->local_state()); 1182 local_state_pref_change_registrar_->Init(g_browser_process->local_state());
1138 local_state_pref_change_registrar_->Add( 1183 local_state_pref_change_registrar_->Add(
1139 prefs::kApplicationLocale, 1184 prefs::kApplicationLocale,
1140 base::Bind(&AccessibilityManager::OnLocaleChanged, 1185 base::Bind(&AccessibilityManager::OnLocaleChanged,
1141 base::Unretained(this))); 1186 base::Unretained(this)));
1142 1187
1143 content::BrowserAccessibilityState::GetInstance()->AddHistogramCallback( 1188 content::BrowserAccessibilityState::GetInstance()->AddHistogramCallback(
1144 base::Bind( 1189 base::Bind(
1145 &AccessibilityManager::UpdateChromeOSAccessibilityHistograms, 1190 &AccessibilityManager::UpdateChromeOSAccessibilityHistograms,
1146 base::Unretained(this))); 1191 base::Unretained(this)));
1147 1192
1148 extensions::ExtensionRegistry* registry = 1193 extensions::ExtensionRegistry* registry =
1149 extensions::ExtensionRegistry::Get(profile); 1194 extensions::ExtensionRegistry::Get(profile);
1150 if (!extension_registry_observer_.IsObserving(registry)) 1195 if (!extension_registry_observer_.IsObserving(registry))
1151 extension_registry_observer_.Add(registry); 1196 extension_registry_observer_.Add(registry);
1152 } 1197 }
1153 1198
1154 large_cursor_pref_handler_.HandleProfileChanged(profile_, profile); 1199 large_cursor_pref_handler_.HandleProfileChanged(profile_, profile);
1155 spoken_feedback_pref_handler_.HandleProfileChanged(profile_, profile); 1200 spoken_feedback_pref_handler_.HandleProfileChanged(profile_, profile);
1156 high_contrast_pref_handler_.HandleProfileChanged(profile_, profile); 1201 high_contrast_pref_handler_.HandleProfileChanged(profile_, profile);
1202 sticky_keys_pref_handler_.HandleProfileChanged(profile_, profile);
1157 autoclick_pref_handler_.HandleProfileChanged(profile_, profile); 1203 autoclick_pref_handler_.HandleProfileChanged(profile_, profile);
1158 autoclick_delay_pref_handler_.HandleProfileChanged(profile_, profile); 1204 autoclick_delay_pref_handler_.HandleProfileChanged(profile_, profile);
1159 virtual_keyboard_pref_handler_.HandleProfileChanged(profile_, profile); 1205 virtual_keyboard_pref_handler_.HandleProfileChanged(profile_, profile);
1160 mono_audio_pref_handler_.HandleProfileChanged(profile_, profile); 1206 mono_audio_pref_handler_.HandleProfileChanged(profile_, profile);
1161 caret_highlight_pref_handler_.HandleProfileChanged(profile_, profile); 1207 caret_highlight_pref_handler_.HandleProfileChanged(profile_, profile);
1162 cursor_highlight_pref_handler_.HandleProfileChanged(profile_, profile); 1208 cursor_highlight_pref_handler_.HandleProfileChanged(profile_, profile);
1163 focus_highlight_pref_handler_.HandleProfileChanged(profile_, profile); 1209 focus_highlight_pref_handler_.HandleProfileChanged(profile_, profile);
1210 tap_dragging_pref_handler_.HandleProfileChanged(profile_, profile);
1164 select_to_speak_pref_handler_.HandleProfileChanged(profile_, profile); 1211 select_to_speak_pref_handler_.HandleProfileChanged(profile_, profile);
1165 switch_access_pref_handler_.HandleProfileChanged(profile_, profile); 1212 switch_access_pref_handler_.HandleProfileChanged(profile_, profile);
1166 1213
1167 bool had_profile = (profile_ != NULL); 1214 bool had_profile = (profile_ != NULL);
1168 profile_ = profile; 1215 profile_ = profile;
1169 1216
1170 if (!had_profile && profile) 1217 if (!had_profile && profile)
1171 CheckBrailleState(); 1218 CheckBrailleState();
1172 else 1219 else
1173 UpdateBrailleImeState(); 1220 UpdateBrailleImeState();
1174 UpdateLargeCursorFromPref(); 1221 UpdateLargeCursorFromPref();
1175 UpdateStickyKeysFromPref(); 1222 UpdateStickyKeysFromPref();
1176 UpdateSpokenFeedbackFromPref(); 1223 UpdateSpokenFeedbackFromPref();
1177 UpdateHighContrastFromPref(); 1224 UpdateHighContrastFromPref();
1178 UpdateAutoclickFromPref(); 1225 UpdateAutoclickFromPref();
1179 UpdateAutoclickDelayFromPref(); 1226 UpdateAutoclickDelayFromPref();
1180 UpdateVirtualKeyboardFromPref(); 1227 UpdateVirtualKeyboardFromPref();
1181 UpdateMonoAudioFromPref(); 1228 UpdateMonoAudioFromPref();
1182 UpdateCaretHighlightFromPref(); 1229 UpdateCaretHighlightFromPref();
1183 UpdateCursorHighlightFromPref(); 1230 UpdateCursorHighlightFromPref();
1184 UpdateFocusHighlightFromPref(); 1231 UpdateFocusHighlightFromPref();
1232 UpdateTapDraggingFromPref();
1185 UpdateSelectToSpeakFromPref(); 1233 UpdateSelectToSpeakFromPref();
1186 UpdateSwitchAccessFromPref(); 1234 UpdateSwitchAccessFromPref();
1187 1235
1188 // Update the panel height in the shelf layout manager when the profile 1236 // Update the panel height in the shelf layout manager when the profile
1189 // changes, since the shelf layout manager doesn't exist in the login profile. 1237 // changes, since the shelf layout manager doesn't exist in the login profile.
1190 if (chromevox_panel_) 1238 if (chromevox_panel_)
1191 chromevox_panel_->UpdatePanelHeight(); 1239 chromevox_panel_->UpdatePanelHeight();
1192 } 1240 }
1193 1241
1194 void AccessibilityManager::ActiveUserChanged( 1242 void AccessibilityManager::ActiveUserChanged(
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after
1448 content::BrowserContext* context) { 1496 content::BrowserContext* context) {
1449 keyboard_listener_extension_id_ = id; 1497 keyboard_listener_extension_id_ = id;
1450 1498
1451 extensions::ExtensionRegistry* registry = 1499 extensions::ExtensionRegistry* registry =
1452 extensions::ExtensionRegistry::Get(context); 1500 extensions::ExtensionRegistry::Get(context);
1453 if (!extension_registry_observer_.IsObserving(registry) && !id.empty()) 1501 if (!extension_registry_observer_.IsObserving(registry) && !id.empty())
1454 extension_registry_observer_.Add(registry); 1502 extension_registry_observer_.Add(registry);
1455 } 1503 }
1456 1504
1457 } // namespace chromeos 1505 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698