| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_LOGIN_WIZARD_ACCESSIBILITY_HANDLER_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_WIZARD_ACCESSIBILITY_HANDLER_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_WIZARD_ACCESSIBILITY_HANDLER_H_ | 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_WIZARD_ACCESSIBILITY_HANDLER_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| 11 #include "base/gtest_prod_util.h" | 11 #include "base/gtest_prod_util.h" |
| 12 #include "content/common/content_notification_types.h" |
| 12 #include "content/common/notification_observer.h" | 13 #include "content/common/notification_observer.h" |
| 13 #include "content/common/notification_source.h" | 14 #include "content/common/notification_source.h" |
| 14 #include "content/common/notification_type.h" | |
| 15 | 15 |
| 16 class AccessibilityControlInfo; | 16 class AccessibilityControlInfo; |
| 17 class AccessibilityTextBoxInfo; | 17 class AccessibilityTextBoxInfo; |
| 18 | 18 |
| 19 namespace chromeos { | 19 namespace chromeos { |
| 20 | 20 |
| 21 enum EarconType { | 21 enum EarconType { |
| 22 NO_EARCON, | 22 NO_EARCON, |
| 23 EARCON_BUTTON, | 23 EARCON_BUTTON, |
| 24 EARCON_CHECK_OFF, | 24 EARCON_CHECK_OFF, |
| (...skipping 12 matching lines...) Expand all Loading... |
| 37 // appropriate spoken/audio feedback. | 37 // appropriate spoken/audio feedback. |
| 38 class WizardAccessibilityHandler : public NotificationObserver { | 38 class WizardAccessibilityHandler : public NotificationObserver { |
| 39 public: | 39 public: |
| 40 WizardAccessibilityHandler() { } | 40 WizardAccessibilityHandler() { } |
| 41 | 41 |
| 42 // Speaks the specified string. | 42 // Speaks the specified string. |
| 43 void Speak(const char* speak_str, bool queue, bool interruptible); | 43 void Speak(const char* speak_str, bool queue, bool interruptible); |
| 44 | 44 |
| 45 private: | 45 private: |
| 46 // Override from NotificationObserver. | 46 // Override from NotificationObserver. |
| 47 virtual void Observe(NotificationType type, | 47 virtual void Observe(int type, |
| 48 const NotificationSource& source, | 48 const NotificationSource& source, |
| 49 const NotificationDetails& details); | 49 const NotificationDetails& details); |
| 50 | 50 |
| 51 // Get text to speak and an earcon identifier (which may be NONE) for any | 51 // Get text to speak and an earcon identifier (which may be NONE) for any |
| 52 // accessibility event. | 52 // accessibility event. |
| 53 void DescribeAccessibilityEvent(NotificationType event_type, | 53 void DescribeAccessibilityEvent(int event_type, |
| 54 const AccessibilityControlInfo* control_info, | 54 const AccessibilityControlInfo* control_info, |
| 55 std::string* out_spoken_description, | 55 std::string* out_spoken_description, |
| 56 EarconType* out_earcon); | 56 EarconType* out_earcon); |
| 57 | 57 |
| 58 // Get text to speak and an optional earcon identifier, specifically for | 58 // Get text to speak and an optional earcon identifier, specifically for |
| 59 // a focus or select accessibility event on a control. | 59 // a focus or select accessibility event on a control. |
| 60 void DescribeControl(const AccessibilityControlInfo* control_info, | 60 void DescribeControl(const AccessibilityControlInfo* control_info, |
| 61 bool is_action, | 61 bool is_action, |
| 62 std::string* out_spoken_description, | 62 std::string* out_spoken_description, |
| 63 EarconType* out_earcon); | 63 EarconType* out_earcon); |
| (...skipping 26 matching lines...) Expand all Loading... |
| 90 friend class WizardAccessibilityHandlerTest; | 90 friend class WizardAccessibilityHandlerTest; |
| 91 FRIEND_TEST_ALL_PREFIXES(WizardAccessibilityHandlerTest, TestFocusEvents); | 91 FRIEND_TEST_ALL_PREFIXES(WizardAccessibilityHandlerTest, TestFocusEvents); |
| 92 FRIEND_TEST_ALL_PREFIXES(WizardAccessibilityHandlerTest, TestTextEvents); | 92 FRIEND_TEST_ALL_PREFIXES(WizardAccessibilityHandlerTest, TestTextEvents); |
| 93 | 93 |
| 94 DISALLOW_COPY_AND_ASSIGN(WizardAccessibilityHandler); | 94 DISALLOW_COPY_AND_ASSIGN(WizardAccessibilityHandler); |
| 95 }; | 95 }; |
| 96 | 96 |
| 97 } // namespace chromeos | 97 } // namespace chromeos |
| 98 | 98 |
| 99 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_WIZARD_ACCESSIBILITY_HANDLER_H_ | 99 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_WIZARD_ACCESSIBILITY_HANDLER_H_ |
| OLD | NEW |