| 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 26 matching lines...) Expand all Loading... |
| 37 | 37 |
| 38 class AccessibilityExtensionLoader; | 38 class AccessibilityExtensionLoader; |
| 39 class AccessibilityHighlightManager; | 39 class AccessibilityHighlightManager; |
| 40 class SelectToSpeakEventHandler; | 40 class SelectToSpeakEventHandler; |
| 41 class SwitchAccessEventHandler; | 41 class SwitchAccessEventHandler; |
| 42 | 42 |
| 43 enum AccessibilityNotificationType { | 43 enum AccessibilityNotificationType { |
| 44 ACCESSIBILITY_MANAGER_SHUTDOWN, | 44 ACCESSIBILITY_MANAGER_SHUTDOWN, |
| 45 ACCESSIBILITY_TOGGLE_HIGH_CONTRAST_MODE, | 45 ACCESSIBILITY_TOGGLE_HIGH_CONTRAST_MODE, |
| 46 ACCESSIBILITY_TOGGLE_LARGE_CURSOR, | 46 ACCESSIBILITY_TOGGLE_LARGE_CURSOR, |
| 47 ACCESSIBILITY_TOGGLE_STICKY_KEYS, |
| 47 ACCESSIBILITY_TOGGLE_SCREEN_MAGNIFIER, | 48 ACCESSIBILITY_TOGGLE_SCREEN_MAGNIFIER, |
| 48 ACCESSIBILITY_TOGGLE_SPOKEN_FEEDBACK, | 49 ACCESSIBILITY_TOGGLE_SPOKEN_FEEDBACK, |
| 49 ACCESSIBILITY_TOGGLE_VIRTUAL_KEYBOARD, | 50 ACCESSIBILITY_TOGGLE_VIRTUAL_KEYBOARD, |
| 50 ACCESSIBILITY_TOGGLE_MONO_AUDIO, | 51 ACCESSIBILITY_TOGGLE_MONO_AUDIO, |
| 51 ACCESSIBILITY_TOGGLE_CARET_HIGHLIGHT, | 52 ACCESSIBILITY_TOGGLE_CARET_HIGHLIGHT, |
| 52 ACCESSIBILITY_TOGGLE_CURSOR_HIGHLIGHT, | 53 ACCESSIBILITY_TOGGLE_CURSOR_HIGHLIGHT, |
| 53 ACCESSIBILITY_TOGGLE_FOCUS_HIGHLIGHT, | 54 ACCESSIBILITY_TOGGLE_FOCUS_HIGHLIGHT, |
| 55 ACCESSIBILITY_TOGGLE_TAP_DRAGGING, |
| 54 ACCESSIBILITY_BRAILLE_DISPLAY_CONNECTION_STATE_CHANGED | 56 ACCESSIBILITY_BRAILLE_DISPLAY_CONNECTION_STATE_CHANGED |
| 55 }; | 57 }; |
| 56 | 58 |
| 57 struct AccessibilityStatusEventDetails { | 59 struct AccessibilityStatusEventDetails { |
| 58 AccessibilityStatusEventDetails( | 60 AccessibilityStatusEventDetails( |
| 59 AccessibilityNotificationType notification_type, | 61 AccessibilityNotificationType notification_type, |
| 60 bool enabled, | 62 bool enabled, |
| 61 ash::AccessibilityNotificationVisibility notify); | 63 ash::AccessibilityNotificationVisibility notify); |
| 62 | 64 |
| 63 AccessibilityStatusEventDetails( | 65 AccessibilityStatusEventDetails( |
| (...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 199 | 201 |
| 200 // Returns if cursor highlighting is enabled. | 202 // Returns if cursor highlighting is enabled. |
| 201 bool IsCursorHighlightEnabled() const; | 203 bool IsCursorHighlightEnabled() const; |
| 202 | 204 |
| 203 // Invoked to enable or disable focus highlighting. | 205 // Invoked to enable or disable focus highlighting. |
| 204 void SetFocusHighlightEnabled(bool enabled); | 206 void SetFocusHighlightEnabled(bool enabled); |
| 205 | 207 |
| 206 // Returns if focus highlighting is enabled. | 208 // Returns if focus highlighting is enabled. |
| 207 bool IsFocusHighlightEnabled() const; | 209 bool IsFocusHighlightEnabled() const; |
| 208 | 210 |
| 211 // Enables or disables tap dragging. |
| 212 void EnableTapDragging(bool enabled); |
| 213 |
| 214 // Returns true if the tap dragging is enabled, or false if not. |
| 215 bool IsTapDraggingEnabled(); |
| 216 |
| 209 // Invoked to enable or disable select-to-speak. | 217 // Invoked to enable or disable select-to-speak. |
| 210 void SetSelectToSpeakEnabled(bool enabled); | 218 void SetSelectToSpeakEnabled(bool enabled); |
| 211 | 219 |
| 212 // Returns if select-to-speak is enabled. | 220 // Returns if select-to-speak is enabled. |
| 213 bool IsSelectToSpeakEnabled() const; | 221 bool IsSelectToSpeakEnabled() const; |
| 214 | 222 |
| 215 // Invoked to enable or disable switch access. | 223 // Invoked to enable or disable switch access. |
| 216 void SetSwitchAccessEnabled(bool enabled); | 224 void SetSwitchAccessEnabled(bool enabled); |
| 217 | 225 |
| 218 // Returns if switch access is enabled. | 226 // Returns if switch access is enabled. |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 309 void UpdateStickyKeysFromPref(); | 317 void UpdateStickyKeysFromPref(); |
| 310 void UpdateSpokenFeedbackFromPref(); | 318 void UpdateSpokenFeedbackFromPref(); |
| 311 void UpdateHighContrastFromPref(); | 319 void UpdateHighContrastFromPref(); |
| 312 void UpdateAutoclickFromPref(); | 320 void UpdateAutoclickFromPref(); |
| 313 void UpdateAutoclickDelayFromPref(); | 321 void UpdateAutoclickDelayFromPref(); |
| 314 void UpdateVirtualKeyboardFromPref(); | 322 void UpdateVirtualKeyboardFromPref(); |
| 315 void UpdateMonoAudioFromPref(); | 323 void UpdateMonoAudioFromPref(); |
| 316 void UpdateCaretHighlightFromPref(); | 324 void UpdateCaretHighlightFromPref(); |
| 317 void UpdateCursorHighlightFromPref(); | 325 void UpdateCursorHighlightFromPref(); |
| 318 void UpdateFocusHighlightFromPref(); | 326 void UpdateFocusHighlightFromPref(); |
| 327 void UpdateTapDraggingFromPref(); |
| 319 void UpdateSelectToSpeakFromPref(); | 328 void UpdateSelectToSpeakFromPref(); |
| 320 void UpdateSwitchAccessFromPref(); | 329 void UpdateSwitchAccessFromPref(); |
| 321 void UpdateAccessibilityHighlightingFromPrefs(); | 330 void UpdateAccessibilityHighlightingFromPrefs(); |
| 322 | 331 |
| 323 void CheckBrailleState(); | 332 void CheckBrailleState(); |
| 324 void ReceiveBrailleDisplayState( | 333 void ReceiveBrailleDisplayState( |
| 325 std::unique_ptr<extensions::api::braille_display_private::DisplayState> | 334 std::unique_ptr<extensions::api::braille_display_private::DisplayState> |
| 326 state); | 335 state); |
| 327 void UpdateBrailleImeState(); | 336 void UpdateBrailleImeState(); |
| 328 | 337 |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 361 // Profile which has the current a11y context. | 370 // Profile which has the current a11y context. |
| 362 Profile* profile_; | 371 Profile* profile_; |
| 363 | 372 |
| 364 content::NotificationRegistrar notification_registrar_; | 373 content::NotificationRegistrar notification_registrar_; |
| 365 std::unique_ptr<PrefChangeRegistrar> pref_change_registrar_; | 374 std::unique_ptr<PrefChangeRegistrar> pref_change_registrar_; |
| 366 std::unique_ptr<PrefChangeRegistrar> local_state_pref_change_registrar_; | 375 std::unique_ptr<PrefChangeRegistrar> local_state_pref_change_registrar_; |
| 367 std::unique_ptr<user_manager::ScopedUserSessionStateObserver> | 376 std::unique_ptr<user_manager::ScopedUserSessionStateObserver> |
| 368 session_state_observer_; | 377 session_state_observer_; |
| 369 | 378 |
| 370 PrefHandler large_cursor_pref_handler_; | 379 PrefHandler large_cursor_pref_handler_; |
| 380 PrefHandler sticky_keys_pref_handler_; |
| 371 PrefHandler spoken_feedback_pref_handler_; | 381 PrefHandler spoken_feedback_pref_handler_; |
| 372 PrefHandler high_contrast_pref_handler_; | 382 PrefHandler high_contrast_pref_handler_; |
| 373 PrefHandler autoclick_pref_handler_; | 383 PrefHandler autoclick_pref_handler_; |
| 374 PrefHandler autoclick_delay_pref_handler_; | 384 PrefHandler autoclick_delay_pref_handler_; |
| 375 PrefHandler virtual_keyboard_pref_handler_; | 385 PrefHandler virtual_keyboard_pref_handler_; |
| 376 PrefHandler mono_audio_pref_handler_; | 386 PrefHandler mono_audio_pref_handler_; |
| 377 PrefHandler caret_highlight_pref_handler_; | 387 PrefHandler caret_highlight_pref_handler_; |
| 378 PrefHandler cursor_highlight_pref_handler_; | 388 PrefHandler cursor_highlight_pref_handler_; |
| 379 PrefHandler focus_highlight_pref_handler_; | 389 PrefHandler focus_highlight_pref_handler_; |
| 390 PrefHandler tap_dragging_pref_handler_; |
| 380 PrefHandler select_to_speak_pref_handler_; | 391 PrefHandler select_to_speak_pref_handler_; |
| 381 PrefHandler switch_access_pref_handler_; | 392 PrefHandler switch_access_pref_handler_; |
| 382 | 393 |
| 383 bool large_cursor_enabled_; | 394 bool large_cursor_enabled_; |
| 384 int large_cursor_size_in_dip_; | 395 int large_cursor_size_in_dip_; |
| 385 bool sticky_keys_enabled_; | 396 bool sticky_keys_enabled_; |
| 386 bool spoken_feedback_enabled_; | 397 bool spoken_feedback_enabled_; |
| 387 bool high_contrast_enabled_; | 398 bool high_contrast_enabled_; |
| 388 bool autoclick_enabled_; | 399 bool autoclick_enabled_; |
| 389 base::TimeDelta autoclick_delay_ms_; | 400 base::TimeDelta autoclick_delay_ms_; |
| 390 bool virtual_keyboard_enabled_; | 401 bool virtual_keyboard_enabled_; |
| 391 bool mono_audio_enabled_; | 402 bool mono_audio_enabled_; |
| 392 bool caret_highlight_enabled_; | 403 bool caret_highlight_enabled_; |
| 393 bool cursor_highlight_enabled_; | 404 bool cursor_highlight_enabled_; |
| 394 bool focus_highlight_enabled_; | 405 bool focus_highlight_enabled_; |
| 406 bool tap_dragging_enabled_; |
| 395 bool select_to_speak_enabled_; | 407 bool select_to_speak_enabled_; |
| 396 bool switch_access_enabled_; | 408 bool switch_access_enabled_; |
| 397 | 409 |
| 398 ash::AccessibilityNotificationVisibility spoken_feedback_notification_; | 410 ash::AccessibilityNotificationVisibility spoken_feedback_notification_; |
| 399 | 411 |
| 400 bool system_sounds_enabled_; | 412 bool system_sounds_enabled_; |
| 401 | 413 |
| 402 AccessibilityStatusCallbackList callback_list_; | 414 AccessibilityStatusCallbackList callback_list_; |
| 403 | 415 |
| 404 bool braille_display_connected_; | 416 bool braille_display_connected_; |
| (...skipping 30 matching lines...) Expand all Loading... |
| 435 switch_access_event_handler_; | 447 switch_access_event_handler_; |
| 436 | 448 |
| 437 base::WeakPtrFactory<AccessibilityManager> weak_ptr_factory_; | 449 base::WeakPtrFactory<AccessibilityManager> weak_ptr_factory_; |
| 438 | 450 |
| 439 DISALLOW_COPY_AND_ASSIGN(AccessibilityManager); | 451 DISALLOW_COPY_AND_ASSIGN(AccessibilityManager); |
| 440 }; | 452 }; |
| 441 | 453 |
| 442 } // namespace chromeos | 454 } // namespace chromeos |
| 443 | 455 |
| 444 #endif // CHROME_BROWSER_CHROMEOS_ACCESSIBILITY_ACCESSIBILITY_MANAGER_H_ | 456 #endif // CHROME_BROWSER_CHROMEOS_ACCESSIBILITY_ACCESSIBILITY_MANAGER_H_ |
| OLD | NEW |