Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(106)

Side by Side Diff: chrome/browser/chromeos/login/wizard_accessibility_handler.cc

Issue 8511026: Don't start speech synthesis until after the audio mixer is initialized. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/audio_mixer_alsa.cc ('k') | chrome/browser/chromeos/login/wizard_accessibility_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698