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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 AccessibilityStatusCallback; | 69 AccessibilityStatusCallback; |
70 | 70 |
71 typedef base::CallbackList<void(const AccessibilityStatusEventDetails&)> | 71 typedef base::CallbackList<void(const AccessibilityStatusEventDetails&)> |
72 AccessibilityStatusCallbackList; | 72 AccessibilityStatusCallbackList; |
73 | 73 |
74 typedef AccessibilityStatusCallbackList::Subscription | 74 typedef AccessibilityStatusCallbackList::Subscription |
75 AccessibilityStatusSubscription; | 75 AccessibilityStatusSubscription; |
76 | 76 |
77 class ChromeVoxPanelWidgetObserver; | 77 class ChromeVoxPanelWidgetObserver; |
78 | 78 |
| 79 enum class PlaySoundOption { |
| 80 ALWAYS = 0, // The sound is always played. |
| 81 SPOKEN_FEEDBACK_ENABLED, // The sound is played only if spoken feedback is |
| 82 // enabled, or --ash-enable-system-sounds flag is |
| 83 // used. |
| 84 }; |
| 85 |
79 // AccessibilityManager changes the statuses of accessibility features | 86 // AccessibilityManager changes the statuses of accessibility features |
80 // watching profile notifications and pref-changes. | 87 // watching profile notifications and pref-changes. |
81 // TODO(yoshiki): merge MagnificationManager with AccessibilityManager. | 88 // TODO(yoshiki): merge MagnificationManager with AccessibilityManager. |
82 class AccessibilityManager | 89 class AccessibilityManager |
83 : public content::NotificationObserver, | 90 : public content::NotificationObserver, |
84 public extensions::api::braille_display_private::BrailleObserver, | 91 public extensions::api::braille_display_private::BrailleObserver, |
85 public extensions::ExtensionRegistryObserver, | 92 public extensions::ExtensionRegistryObserver, |
86 public ash::SessionStateObserver, | 93 public ash::SessionStateObserver, |
87 public ash::ShellObserver, | 94 public ash::ShellObserver, |
88 public input_method::InputMethodManager::Observer { | 95 public input_method::InputMethodManager::Observer { |
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
237 // Notify registered callbacks of a status change in an accessibility setting. | 244 // Notify registered callbacks of a status change in an accessibility setting. |
238 void NotifyAccessibilityStatusChanged( | 245 void NotifyAccessibilityStatusChanged( |
239 AccessibilityStatusEventDetails& details); | 246 AccessibilityStatusEventDetails& details); |
240 | 247 |
241 // Notify accessibility when locale changes occur. | 248 // Notify accessibility when locale changes occur. |
242 void OnLocaleChanged(); | 249 void OnLocaleChanged(); |
243 | 250 |
244 // Plays an earcon. Earcons are brief and distinctive sounds that indicate | 251 // Plays an earcon. Earcons are brief and distinctive sounds that indicate |
245 // when their mapped event has occurred. The sound key enums can be found in | 252 // when their mapped event has occurred. The sound key enums can be found in |
246 // chromeos/audio/chromeos_sounds.h. | 253 // chromeos/audio/chromeos_sounds.h. |
247 void PlayEarcon(int sound_key); | 254 bool PlayEarcon(int sound_key, PlaySoundOption option); |
248 | 255 |
249 // Forward an accessibility gesture from the touch exploration controller | 256 // Forward an accessibility gesture from the touch exploration controller |
250 // to ChromeVox. | 257 // to ChromeVox. |
251 void HandleAccessibilityGesture(ui::AXGesture gesture); | 258 void HandleAccessibilityGesture(ui::AXGesture gesture); |
252 | 259 |
253 // Update the touch exploration controller so that synthesized | 260 // Update the touch exploration controller so that synthesized |
254 // touch events are anchored at this point. | 261 // touch events are anchored at this point. |
255 void SetTouchAccessibilityAnchorPoint(const gfx::Point& anchor_point); | 262 void SetTouchAccessibilityAnchorPoint(const gfx::Point& anchor_point); |
256 | 263 |
257 // Called by our widget observer when the ChromeVoxPanel is closing. | 264 // Called by our widget observer when the ChromeVoxPanel is closing. |
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
407 accessibility_highlight_manager_; | 414 accessibility_highlight_manager_; |
408 | 415 |
409 base::WeakPtrFactory<AccessibilityManager> weak_ptr_factory_; | 416 base::WeakPtrFactory<AccessibilityManager> weak_ptr_factory_; |
410 | 417 |
411 DISALLOW_COPY_AND_ASSIGN(AccessibilityManager); | 418 DISALLOW_COPY_AND_ASSIGN(AccessibilityManager); |
412 }; | 419 }; |
413 | 420 |
414 } // namespace chromeos | 421 } // namespace chromeos |
415 | 422 |
416 #endif // CHROME_BROWSER_CHROMEOS_ACCESSIBILITY_ACCESSIBILITY_MANAGER_H_ | 423 #endif // CHROME_BROWSER_CHROMEOS_ACCESSIBILITY_ACCESSIBILITY_MANAGER_H_ |
OLD | NEW |