| 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 #include "chrome/browser/chromeos/login/wizard_accessibility_handler.h" | 5 #include "chrome/browser/chromeos/login/wizard_accessibility_handler.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/i18n/char_iterator.h" | 9 #include "base/i18n/char_iterator.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 | 101 |
| 102 void WizardAccessibilityHandler::Observe( | 102 void WizardAccessibilityHandler::Observe( |
| 103 int type, | 103 int type, |
| 104 const content::NotificationSource& source, | 104 const content::NotificationSource& source, |
| 105 const content::NotificationDetails& details) { | 105 const content::NotificationDetails& details) { |
| 106 const AccessibilityControlInfo *control_info = | 106 const AccessibilityControlInfo *control_info = |
| 107 content::Details<const AccessibilityControlInfo>(details).ptr(); | 107 content::Details<const AccessibilityControlInfo>(details).ptr(); |
| 108 std::string description; | 108 std::string description; |
| 109 EarconType earcon = NO_EARCON; | 109 EarconType earcon = NO_EARCON; |
| 110 DescribeAccessibilityEvent(type, control_info, &description, &earcon); | 110 DescribeAccessibilityEvent(type, control_info, &description, &earcon); |
| 111 accessibility::Speak(description.c_str(), false, true); | 111 accessibility::Speak(description.c_str()); |
| 112 } | 112 } |
| 113 | 113 |
| 114 void WizardAccessibilityHandler::DescribeAccessibilityEvent( | 114 void WizardAccessibilityHandler::DescribeAccessibilityEvent( |
| 115 int event_type, | 115 int event_type, |
| 116 const AccessibilityControlInfo* control_info, | 116 const AccessibilityControlInfo* control_info, |
| 117 std::string* out_spoken_description, | 117 std::string* out_spoken_description, |
| 118 EarconType* out_earcon) { | 118 EarconType* out_earcon) { |
| 119 *out_spoken_description = std::string(); | 119 *out_spoken_description = std::string(); |
| 120 *out_earcon = NO_EARCON; | 120 *out_earcon = NO_EARCON; |
| 121 | 121 |
| (...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 418 } else if (!inserted.empty()) { | 418 } else if (!inserted.empty()) { |
| 419 // Speak inserted text. | 419 // Speak inserted text. |
| 420 AppendUtterance(inserted, out_spoken_description); | 420 AppendUtterance(inserted, out_spoken_description); |
| 421 } else if (!deleted.empty()) { | 421 } else if (!deleted.empty()) { |
| 422 // Speak deleted text. | 422 // Speak deleted text. |
| 423 AppendUtterance(deleted, out_spoken_description); | 423 AppendUtterance(deleted, out_spoken_description); |
| 424 } | 424 } |
| 425 } | 425 } |
| 426 | 426 |
| 427 } // namespace chromeos | 427 } // namespace chromeos |
| OLD | NEW |