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

Side by Side Diff: Source/modules/speech/SpeechSynthesis.cpp

Issue 22572005: Remove all uses of the ASCIILiteral class. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rm it from wtf Created 7 years, 4 months 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 /* 1 /*
2 * Copyright (C) 2013 Apple Inc. All rights reserved. 2 * Copyright (C) 2013 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 m_utteranceQueue.removeFirst(); 154 m_utteranceQueue.removeFirst();
155 155
156 // Start the next job if there is one pending. 156 // Start the next job if there is one pending.
157 if (!m_utteranceQueue.isEmpty()) 157 if (!m_utteranceQueue.isEmpty())
158 startSpeakingImmediately(m_utteranceQueue.first().get()); 158 startSpeakingImmediately(m_utteranceQueue.first().get());
159 } 159 }
160 } 160 }
161 161
162 void SpeechSynthesis::boundaryEventOccurred(PassRefPtr<PlatformSpeechSynthesisUt terance> utterance, SpeechBoundary boundary, unsigned charIndex) 162 void SpeechSynthesis::boundaryEventOccurred(PassRefPtr<PlatformSpeechSynthesisUt terance> utterance, SpeechBoundary boundary, unsigned charIndex)
163 { 163 {
164 DEFINE_STATIC_LOCAL(const String, wordBoundaryString, (ASCIILiteral("word")) ); 164 DEFINE_STATIC_LOCAL(const String, wordBoundaryString, ("word"));
165 DEFINE_STATIC_LOCAL(const String, sentenceBoundaryString, (ASCIILiteral("sen tence"))); 165 DEFINE_STATIC_LOCAL(const String, sentenceBoundaryString, ("sentence"));
166 166
167 switch (boundary) { 167 switch (boundary) {
168 case SpeechWordBoundary: 168 case SpeechWordBoundary:
169 fireEvent(eventNames().boundaryEvent, static_cast<SpeechSynthesisUtteran ce*>(utterance->client()), charIndex, wordBoundaryString); 169 fireEvent(eventNames().boundaryEvent, static_cast<SpeechSynthesisUtteran ce*>(utterance->client()), charIndex, wordBoundaryString);
170 break; 170 break;
171 case SpeechSentenceBoundary: 171 case SpeechSentenceBoundary:
172 fireEvent(eventNames().boundaryEvent, static_cast<SpeechSynthesisUtteran ce*>(utterance->client()), charIndex, sentenceBoundaryString); 172 fireEvent(eventNames().boundaryEvent, static_cast<SpeechSynthesisUtteran ce*>(utterance->client()), charIndex, sentenceBoundaryString);
173 break; 173 break;
174 default: 174 default:
175 ASSERT_NOT_REACHED(); 175 ASSERT_NOT_REACHED();
(...skipping 26 matching lines...) Expand all
202 handleSpeakingCompleted(static_cast<SpeechSynthesisUtterance*>(utterance ->client()), false); 202 handleSpeakingCompleted(static_cast<SpeechSynthesisUtterance*>(utterance ->client()), false);
203 } 203 }
204 204
205 void SpeechSynthesis::speakingErrorOccurred(PassRefPtr<PlatformSpeechSynthesisUt terance> utterance) 205 void SpeechSynthesis::speakingErrorOccurred(PassRefPtr<PlatformSpeechSynthesisUt terance> utterance)
206 { 206 {
207 if (utterance->client()) 207 if (utterance->client())
208 handleSpeakingCompleted(static_cast<SpeechSynthesisUtterance*>(utterance ->client()), true); 208 handleSpeakingCompleted(static_cast<SpeechSynthesisUtterance*>(utterance ->client()), true);
209 } 209 }
210 210
211 } // namespace WebCore 211 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/modules/speech/SpeechRecognitionError.cpp ('k') | Source/modules/webaudio/MediaStreamAudioDestinationNode.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698