| 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/compiler_specific.h" |
| 11 #include "base/gtest_prod_util.h" | 12 #include "base/gtest_prod_util.h" |
| 12 #include "content/public/browser/notification_observer.h" | 13 #include "content/public/browser/notification_observer.h" |
| 13 #include "content/public/browser/notification_source.h" | 14 #include "content/public/browser/notification_source.h" |
| 14 #include "content/public/browser/notification_types.h" | 15 #include "content/public/browser/notification_types.h" |
| 15 | 16 |
| 16 class AccessibilityControlInfo; | 17 class AccessibilityControlInfo; |
| 17 class AccessibilityTextBoxInfo; | 18 class AccessibilityTextBoxInfo; |
| 18 | 19 |
| 19 namespace chromeos { | 20 namespace chromeos { |
| 20 | 21 |
| (...skipping 15 matching lines...) Expand all Loading... |
| 36 // Class that handles the accessibility notifications and generates | 37 // Class that handles the accessibility notifications and generates |
| 37 // appropriate spoken/audio feedback. | 38 // appropriate spoken/audio feedback. |
| 38 class WizardAccessibilityHandler : public content::NotificationObserver { | 39 class WizardAccessibilityHandler : public content::NotificationObserver { |
| 39 public: | 40 public: |
| 40 WizardAccessibilityHandler() { } | 41 WizardAccessibilityHandler() { } |
| 41 | 42 |
| 42 private: | 43 private: |
| 43 // Override from content::NotificationObserver. | 44 // Override from content::NotificationObserver. |
| 44 virtual void Observe(int type, | 45 virtual void Observe(int type, |
| 45 const content::NotificationSource& source, | 46 const content::NotificationSource& source, |
| 46 const content::NotificationDetails& details); | 47 const content::NotificationDetails& details) OVERRIDE; |
| 47 | 48 |
| 48 // Get text to speak and an earcon identifier (which may be NONE) for any | 49 // Get text to speak and an earcon identifier (which may be NONE) for any |
| 49 // accessibility event. | 50 // accessibility event. |
| 50 void DescribeAccessibilityEvent(int event_type, | 51 void DescribeAccessibilityEvent(int event_type, |
| 51 const AccessibilityControlInfo* control_info, | 52 const AccessibilityControlInfo* control_info, |
| 52 std::string* out_spoken_description, | 53 std::string* out_spoken_description, |
| 53 EarconType* out_earcon); | 54 EarconType* out_earcon); |
| 54 | 55 |
| 55 // Get text to speak and an optional earcon identifier, specifically for | 56 // Get text to speak and an optional earcon identifier, specifically for |
| 56 // a focus or select accessibility event on a control. | 57 // a focus or select accessibility event on a control. |
| (...skipping 30 matching lines...) Expand all Loading... |
| 87 friend class WizardAccessibilityHandlerTest; | 88 friend class WizardAccessibilityHandlerTest; |
| 88 FRIEND_TEST_ALL_PREFIXES(WizardAccessibilityHandlerTest, TestFocusEvents); | 89 FRIEND_TEST_ALL_PREFIXES(WizardAccessibilityHandlerTest, TestFocusEvents); |
| 89 FRIEND_TEST_ALL_PREFIXES(WizardAccessibilityHandlerTest, TestTextEvents); | 90 FRIEND_TEST_ALL_PREFIXES(WizardAccessibilityHandlerTest, TestTextEvents); |
| 90 | 91 |
| 91 DISALLOW_COPY_AND_ASSIGN(WizardAccessibilityHandler); | 92 DISALLOW_COPY_AND_ASSIGN(WizardAccessibilityHandler); |
| 92 }; | 93 }; |
| 93 | 94 |
| 94 } // namespace chromeos | 95 } // namespace chromeos |
| 95 | 96 |
| 96 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_WIZARD_ACCESSIBILITY_HANDLER_H_ | 97 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_WIZARD_ACCESSIBILITY_HANDLER_H_ |
| OLD | NEW |