| 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" |
| 11 #include "ash/common/session/session_state_observer.h" | 11 #include "ash/common/session/session_state_observer.h" |
| 12 #include "ash/common/shell_observer.h" | 12 #include "ash/common/shell_observer.h" |
| 13 #include "base/callback_forward.h" | 13 #include "base/callback_forward.h" |
| 14 #include "base/callback_list.h" | 14 #include "base/callback_list.h" |
| 15 #include "base/macros.h" | 15 #include "base/macros.h" |
| 16 #include "base/memory/weak_ptr.h" | 16 #include "base/memory/weak_ptr.h" |
| 17 #include "base/scoped_observer.h" | 17 #include "base/scoped_observer.h" |
| 18 #include "base/time/time.h" | 18 #include "base/time/time.h" |
| 19 #include "chrome/browser/chromeos/accessibility/accessibility_util.h" | 19 #include "chrome/browser/chromeos/accessibility/accessibility_util.h" |
| 20 #include "chrome/browser/chromeos/accessibility/chromevox_panel.h" | 20 #include "chrome/browser/chromeos/accessibility/chromevox_panel.h" |
| 21 #include "chrome/browser/extensions/api/braille_display_private/braille_controll
er.h" | 21 #include "chrome/browser/extensions/api/braille_display_private/braille_controll
er.h" |
| 22 #include "components/prefs/pref_change_registrar.h" | 22 #include "components/prefs/pref_change_registrar.h" |
| 23 #include "content/public/browser/notification_observer.h" | 23 #include "content/public/browser/notification_observer.h" |
| 24 #include "content/public/browser/notification_registrar.h" | 24 #include "content/public/browser/notification_registrar.h" |
| 25 #include "extensions/browser/event_router.h" | 25 #include "extensions/browser/event_router.h" |
| 26 #include "extensions/browser/extension_system.h" | 26 #include "extensions/browser/extension_system.h" |
| 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 { | |
| 30 class RenderViewHost; | |
| 31 } | |
| 32 | |
| 33 class Profile; | 29 class Profile; |
| 34 | 30 |
| 35 namespace chromeos { | 31 namespace chromeos { |
| 36 | 32 |
| 37 class AccessibilityExtensionLoader; | 33 class AccessibilityExtensionLoader; |
| 38 class AccessibilityHighlightManager; | 34 class AccessibilityHighlightManager; |
| 39 class SelectToSpeakEventHandler; | 35 class SelectToSpeakEventHandler; |
| 40 | 36 |
| 41 enum AccessibilityNotificationType { | 37 enum AccessibilityNotificationType { |
| 42 ACCESSIBILITY_MANAGER_SHUTDOWN, | 38 ACCESSIBILITY_MANAGER_SHUTDOWN, |
| (...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 228 | 224 |
| 229 static void SetBrailleControllerForTest( | 225 static void SetBrailleControllerForTest( |
| 230 extensions::api::braille_display_private::BrailleController* controller); | 226 extensions::api::braille_display_private::BrailleController* controller); |
| 231 | 227 |
| 232 // Enables/disables system sounds. | 228 // Enables/disables system sounds. |
| 233 void EnableSystemSounds(bool system_sounds_enabled); | 229 void EnableSystemSounds(bool system_sounds_enabled); |
| 234 | 230 |
| 235 // Initiates play of shutdown sound and returns it's duration. | 231 // Initiates play of shutdown sound and returns it's duration. |
| 236 base::TimeDelta PlayShutdownSound(); | 232 base::TimeDelta PlayShutdownSound(); |
| 237 | 233 |
| 238 // Injects ChromeVox scripts into given |render_view_host|. | |
| 239 void InjectChromeVox(content::RenderViewHost* render_view_host); | |
| 240 | |
| 241 // Register a callback to be notified when the status of an accessibility | 234 // Register a callback to be notified when the status of an accessibility |
| 242 // option changes. | 235 // option changes. |
| 243 std::unique_ptr<AccessibilityStatusSubscription> RegisterCallback( | 236 std::unique_ptr<AccessibilityStatusSubscription> RegisterCallback( |
| 244 const AccessibilityStatusCallback& cb); | 237 const AccessibilityStatusCallback& cb); |
| 245 | 238 |
| 246 // Notify registered callbacks of a status change in an accessibility setting. | 239 // Notify registered callbacks of a status change in an accessibility setting. |
| 247 void NotifyAccessibilityStatusChanged( | 240 void NotifyAccessibilityStatusChanged( |
| 248 AccessibilityStatusEventDetails& details); | 241 AccessibilityStatusEventDetails& details); |
| 249 | 242 |
| 250 // Notify accessibility when locale changes occur. | 243 // Notify accessibility when locale changes occur. |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 379 bool virtual_keyboard_enabled_; | 372 bool virtual_keyboard_enabled_; |
| 380 bool mono_audio_enabled_; | 373 bool mono_audio_enabled_; |
| 381 bool caret_highlight_enabled_; | 374 bool caret_highlight_enabled_; |
| 382 bool cursor_highlight_enabled_; | 375 bool cursor_highlight_enabled_; |
| 383 bool focus_highlight_enabled_; | 376 bool focus_highlight_enabled_; |
| 384 bool select_to_speak_enabled_; | 377 bool select_to_speak_enabled_; |
| 385 bool switch_access_enabled_; | 378 bool switch_access_enabled_; |
| 386 | 379 |
| 387 ash::AccessibilityNotificationVisibility spoken_feedback_notification_; | 380 ash::AccessibilityNotificationVisibility spoken_feedback_notification_; |
| 388 | 381 |
| 389 bool should_speak_chrome_vox_announcements_on_user_screen_; | |
| 390 | |
| 391 bool system_sounds_enabled_; | 382 bool system_sounds_enabled_; |
| 392 | 383 |
| 393 AccessibilityStatusCallbackList callback_list_; | 384 AccessibilityStatusCallbackList callback_list_; |
| 394 | 385 |
| 395 bool braille_display_connected_; | 386 bool braille_display_connected_; |
| 396 ScopedObserver<extensions::api::braille_display_private::BrailleController, | 387 ScopedObserver<extensions::api::braille_display_private::BrailleController, |
| 397 AccessibilityManager> scoped_braille_observer_; | 388 AccessibilityManager> scoped_braille_observer_; |
| 398 | 389 |
| 399 bool braille_ime_current_; | 390 bool braille_ime_current_; |
| 400 | 391 |
| (...skipping 20 matching lines...) Expand all Loading... |
| 421 select_to_speak_event_handler_; | 412 select_to_speak_event_handler_; |
| 422 | 413 |
| 423 base::WeakPtrFactory<AccessibilityManager> weak_ptr_factory_; | 414 base::WeakPtrFactory<AccessibilityManager> weak_ptr_factory_; |
| 424 | 415 |
| 425 DISALLOW_COPY_AND_ASSIGN(AccessibilityManager); | 416 DISALLOW_COPY_AND_ASSIGN(AccessibilityManager); |
| 426 }; | 417 }; |
| 427 | 418 |
| 428 } // namespace chromeos | 419 } // namespace chromeos |
| 429 | 420 |
| 430 #endif // CHROME_BROWSER_CHROMEOS_ACCESSIBILITY_ACCESSIBILITY_MANAGER_H_ | 421 #endif // CHROME_BROWSER_CHROMEOS_ACCESSIBILITY_ACCESSIBILITY_MANAGER_H_ |
| OLD | NEW |