| 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 PostUnloadChromeVox(); |
| 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 | 292 |
| 297 void UpdateLargeCursorFromPref(); | 293 void UpdateLargeCursorFromPref(); |
| 298 void UpdateStickyKeysFromPref(); | 294 void UpdateStickyKeysFromPref(); |
| 299 void UpdateSpokenFeedbackFromPref(); | 295 void UpdateSpokenFeedbackFromPref(); |
| 300 void UpdateHighContrastFromPref(); | 296 void UpdateHighContrastFromPref(); |
| 301 void UpdateAutoclickFromPref(); | 297 void UpdateAutoclickFromPref(); |
| 302 void UpdateAutoclickDelayFromPref(); | 298 void UpdateAutoclickDelayFromPref(); |
| 303 void UpdateVirtualKeyboardFromPref(); | 299 void UpdateVirtualKeyboardFromPref(); |
| 304 void UpdateMonoAudioFromPref(); | 300 void UpdateMonoAudioFromPref(); |
| 305 void UpdateCaretHighlightFromPref(); | 301 void UpdateCaretHighlightFromPref(); |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 340 void OnShutdown(extensions::ExtensionRegistry* registry) override; | 336 void OnShutdown(extensions::ExtensionRegistry* registry) override; |
| 341 | 337 |
| 342 // InputMethodManager::Observer | 338 // InputMethodManager::Observer |
| 343 void InputMethodChanged(input_method::InputMethodManager* manager, | 339 void InputMethodChanged(input_method::InputMethodManager* manager, |
| 344 Profile* profile, | 340 Profile* profile, |
| 345 bool show_message) override; | 341 bool show_message) override; |
| 346 | 342 |
| 347 // Profile which has the current a11y context. | 343 // Profile which has the current a11y context. |
| 348 Profile* profile_; | 344 Profile* profile_; |
| 349 | 345 |
| 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_; | 346 content::NotificationRegistrar notification_registrar_; |
| 356 std::unique_ptr<PrefChangeRegistrar> pref_change_registrar_; | 347 std::unique_ptr<PrefChangeRegistrar> pref_change_registrar_; |
| 357 std::unique_ptr<PrefChangeRegistrar> local_state_pref_change_registrar_; | 348 std::unique_ptr<PrefChangeRegistrar> local_state_pref_change_registrar_; |
| 358 std::unique_ptr<ash::ScopedSessionStateObserver> session_state_observer_; | 349 std::unique_ptr<ash::ScopedSessionStateObserver> session_state_observer_; |
| 359 | 350 |
| 360 PrefHandler large_cursor_pref_handler_; | 351 PrefHandler large_cursor_pref_handler_; |
| 361 PrefHandler spoken_feedback_pref_handler_; | 352 PrefHandler spoken_feedback_pref_handler_; |
| 362 PrefHandler high_contrast_pref_handler_; | 353 PrefHandler high_contrast_pref_handler_; |
| 363 PrefHandler autoclick_pref_handler_; | 354 PrefHandler autoclick_pref_handler_; |
| 364 PrefHandler autoclick_delay_pref_handler_; | 355 PrefHandler autoclick_delay_pref_handler_; |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 406 bool keyboard_listener_capture_; | 397 bool keyboard_listener_capture_; |
| 407 | 398 |
| 408 // Listen to extension unloaded notifications. | 399 // Listen to extension unloaded notifications. |
| 409 ScopedObserver<extensions::ExtensionRegistry, | 400 ScopedObserver<extensions::ExtensionRegistry, |
| 410 extensions::ExtensionRegistryObserver> | 401 extensions::ExtensionRegistryObserver> |
| 411 extension_registry_observer_; | 402 extension_registry_observer_; |
| 412 | 403 |
| 413 std::unique_ptr<AccessibilityHighlightManager> | 404 std::unique_ptr<AccessibilityHighlightManager> |
| 414 accessibility_highlight_manager_; | 405 accessibility_highlight_manager_; |
| 415 | 406 |
| 407 std::unique_ptr<AccessibilityExtensionLoader> chromevox_loader_; |
| 408 |
| 416 base::WeakPtrFactory<AccessibilityManager> weak_ptr_factory_; | 409 base::WeakPtrFactory<AccessibilityManager> weak_ptr_factory_; |
| 417 | 410 |
| 418 DISALLOW_COPY_AND_ASSIGN(AccessibilityManager); | 411 DISALLOW_COPY_AND_ASSIGN(AccessibilityManager); |
| 419 }; | 412 }; |
| 420 | 413 |
| 421 } // namespace chromeos | 414 } // namespace chromeos |
| 422 | 415 |
| 423 #endif // CHROME_BROWSER_CHROMEOS_ACCESSIBILITY_ACCESSIBILITY_MANAGER_H_ | 416 #endif // CHROME_BROWSER_CHROMEOS_ACCESSIBILITY_ACCESSIBILITY_MANAGER_H_ |
| OLD | NEW |