| OLD | NEW |
| 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 #ifndef CHROME_BROWSER_CHROMEOS_ACCESSIBILITY_ACCESSIBILITY_MANAGER_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_ACCESSIBILITY_ACCESSIBILITY_MANAGER_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_ACCESSIBILITY_ACCESSIBILITY_MANAGER_H_ | 6 #define CHROME_BROWSER_CHROMEOS_ACCESSIBILITY_ACCESSIBILITY_MANAGER_H_ |
| 7 | 7 |
| 8 #include <set> | 8 #include <set> |
| 9 | 9 |
| 10 #include "ash/common/accessibility_types.h" | 10 #include "ash/common/accessibility_types.h" |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 #include "ui/base/ime/chromeos/input_method_manager.h" | 27 #include "ui/base/ime/chromeos/input_method_manager.h" |
| 28 | 28 |
| 29 namespace content { | 29 namespace content { |
| 30 class RenderViewHost; | 30 class RenderViewHost; |
| 31 } | 31 } |
| 32 | 32 |
| 33 class Profile; | 33 class Profile; |
| 34 | 34 |
| 35 namespace chromeos { | 35 namespace chromeos { |
| 36 | 36 |
| 37 class AccessibilityExtensionLoader; |
| 37 class AccessibilityHighlightManager; | 38 class AccessibilityHighlightManager; |
| 38 | 39 |
| 39 enum AccessibilityNotificationType { | 40 enum AccessibilityNotificationType { |
| 40 ACCESSIBILITY_MANAGER_SHUTDOWN, | 41 ACCESSIBILITY_MANAGER_SHUTDOWN, |
| 41 ACCESSIBILITY_TOGGLE_HIGH_CONTRAST_MODE, | 42 ACCESSIBILITY_TOGGLE_HIGH_CONTRAST_MODE, |
| 42 ACCESSIBILITY_TOGGLE_LARGE_CURSOR, | 43 ACCESSIBILITY_TOGGLE_LARGE_CURSOR, |
| 43 ACCESSIBILITY_TOGGLE_SCREEN_MAGNIFIER, | 44 ACCESSIBILITY_TOGGLE_SCREEN_MAGNIFIER, |
| 44 ACCESSIBILITY_TOGGLE_SPOKEN_FEEDBACK, | 45 ACCESSIBILITY_TOGGLE_SPOKEN_FEEDBACK, |
| 45 ACCESSIBILITY_TOGGLE_VIRTUAL_KEYBOARD, | 46 ACCESSIBILITY_TOGGLE_VIRTUAL_KEYBOARD, |
| 46 ACCESSIBILITY_TOGGLE_MONO_AUDIO, | 47 ACCESSIBILITY_TOGGLE_MONO_AUDIO, |
| (...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 279 void set_keyboard_listener_capture(bool val) { | 280 void set_keyboard_listener_capture(bool val) { |
| 280 keyboard_listener_capture_ = val; | 281 keyboard_listener_capture_ = val; |
| 281 } | 282 } |
| 282 bool keyboard_listener_capture() { return keyboard_listener_capture_; } | 283 bool keyboard_listener_capture() { return keyboard_listener_capture_; } |
| 283 | 284 |
| 284 protected: | 285 protected: |
| 285 AccessibilityManager(); | 286 AccessibilityManager(); |
| 286 ~AccessibilityManager() override; | 287 ~AccessibilityManager() override; |
| 287 | 288 |
| 288 private: | 289 private: |
| 289 void LoadChromeVox(); | 290 void PostLoadChromeVox(); |
| 290 void LoadChromeVoxToUserScreen(const base::Closure& done_cb); | |
| 291 void LoadChromeVoxToLockScreen(const base::Closure& done_cb); | |
| 292 void UnloadChromeVox(); | |
| 293 void UnloadChromeVoxFromLockScreen(); | |
| 294 void PostLoadChromeVox(Profile* profile); | |
| 295 void PostUnloadChromeVox(Profile* profile); | |
| 296 | 291 |
| 297 void UpdateLargeCursorFromPref(); | 292 void UpdateLargeCursorFromPref(); |
| 298 void UpdateStickyKeysFromPref(); | 293 void UpdateStickyKeysFromPref(); |
| 299 void UpdateSpokenFeedbackFromPref(); | 294 void UpdateSpokenFeedbackFromPref(); |
| 300 void UpdateHighContrastFromPref(); | 295 void UpdateHighContrastFromPref(); |
| 301 void UpdateAutoclickFromPref(); | 296 void UpdateAutoclickFromPref(); |
| 302 void UpdateAutoclickDelayFromPref(); | 297 void UpdateAutoclickDelayFromPref(); |
| 303 void UpdateVirtualKeyboardFromPref(); | 298 void UpdateVirtualKeyboardFromPref(); |
| 304 void UpdateMonoAudioFromPref(); | 299 void UpdateMonoAudioFromPref(); |
| 305 void UpdateCaretHighlightFromPref(); | 300 void UpdateCaretHighlightFromPref(); |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 340 void OnShutdown(extensions::ExtensionRegistry* registry) override; | 335 void OnShutdown(extensions::ExtensionRegistry* registry) override; |
| 341 | 336 |
| 342 // InputMethodManager::Observer | 337 // InputMethodManager::Observer |
| 343 void InputMethodChanged(input_method::InputMethodManager* manager, | 338 void InputMethodChanged(input_method::InputMethodManager* manager, |
| 344 Profile* profile, | 339 Profile* profile, |
| 345 bool show_message) override; | 340 bool show_message) override; |
| 346 | 341 |
| 347 // Profile which has the current a11y context. | 342 // Profile which has the current a11y context. |
| 348 Profile* profile_; | 343 Profile* profile_; |
| 349 | 344 |
| 350 // Profile which ChromeVox is currently loaded to. If NULL, ChromeVox is not | |
| 351 // loaded to any profile. | |
| 352 bool chrome_vox_loaded_on_lock_screen_; | |
| 353 bool chrome_vox_loaded_on_user_screen_; | |
| 354 | |
| 355 content::NotificationRegistrar notification_registrar_; | 345 content::NotificationRegistrar notification_registrar_; |
| 356 std::unique_ptr<PrefChangeRegistrar> pref_change_registrar_; | 346 std::unique_ptr<PrefChangeRegistrar> pref_change_registrar_; |
| 357 std::unique_ptr<PrefChangeRegistrar> local_state_pref_change_registrar_; | 347 std::unique_ptr<PrefChangeRegistrar> local_state_pref_change_registrar_; |
| 358 std::unique_ptr<ash::ScopedSessionStateObserver> session_state_observer_; | 348 std::unique_ptr<ash::ScopedSessionStateObserver> session_state_observer_; |
| 359 | 349 |
| 360 PrefHandler large_cursor_pref_handler_; | 350 PrefHandler large_cursor_pref_handler_; |
| 361 PrefHandler spoken_feedback_pref_handler_; | 351 PrefHandler spoken_feedback_pref_handler_; |
| 362 PrefHandler high_contrast_pref_handler_; | 352 PrefHandler high_contrast_pref_handler_; |
| 363 PrefHandler autoclick_pref_handler_; | 353 PrefHandler autoclick_pref_handler_; |
| 364 PrefHandler autoclick_delay_pref_handler_; | 354 PrefHandler autoclick_delay_pref_handler_; |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 406 bool keyboard_listener_capture_; | 396 bool keyboard_listener_capture_; |
| 407 | 397 |
| 408 // Listen to extension unloaded notifications. | 398 // Listen to extension unloaded notifications. |
| 409 ScopedObserver<extensions::ExtensionRegistry, | 399 ScopedObserver<extensions::ExtensionRegistry, |
| 410 extensions::ExtensionRegistryObserver> | 400 extensions::ExtensionRegistryObserver> |
| 411 extension_registry_observer_; | 401 extension_registry_observer_; |
| 412 | 402 |
| 413 std::unique_ptr<AccessibilityHighlightManager> | 403 std::unique_ptr<AccessibilityHighlightManager> |
| 414 accessibility_highlight_manager_; | 404 accessibility_highlight_manager_; |
| 415 | 405 |
| 406 std::unique_ptr<AccessibilityExtensionLoader> chromevox_loader_; |
| 407 |
| 416 base::WeakPtrFactory<AccessibilityManager> weak_ptr_factory_; | 408 base::WeakPtrFactory<AccessibilityManager> weak_ptr_factory_; |
| 417 | 409 |
| 418 DISALLOW_COPY_AND_ASSIGN(AccessibilityManager); | 410 DISALLOW_COPY_AND_ASSIGN(AccessibilityManager); |
| 419 }; | 411 }; |
| 420 | 412 |
| 421 } // namespace chromeos | 413 } // namespace chromeos |
| 422 | 414 |
| 423 #endif // CHROME_BROWSER_CHROMEOS_ACCESSIBILITY_ACCESSIBILITY_MANAGER_H_ | 415 #endif // CHROME_BROWSER_CHROMEOS_ACCESSIBILITY_ACCESSIBILITY_MANAGER_H_ |
| OLD | NEW |