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

Unified Diff: Source/modules/speech/SpeechSynthesis.cpp

Issue 884973003: Extend PlatformSpeechSynthesizerMock with an utterance queue. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: minor test tidying Created 5 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: Source/modules/speech/SpeechSynthesis.cpp
diff --git a/Source/modules/speech/SpeechSynthesis.cpp b/Source/modules/speech/SpeechSynthesis.cpp
index 56d1c240c736cf018b8dd18c60a3974706125384..a2befba8c09530fd3919d991857d1491570f18c8 100644
--- a/Source/modules/speech/SpeechSynthesis.cpp
+++ b/Source/modules/speech/SpeechSynthesis.cpp
@@ -72,7 +72,7 @@ const HeapVector<Member<SpeechSynthesisVoice>>& SpeechSynthesis::getVoices()
const HeapVector<Member<PlatformSpeechSynthesisVoice>>& platformVoices = m_platformSpeechSynthesizer->voiceList();
size_t voiceCount = platformVoices.size();
for (size_t k = 0; k < voiceCount; k++)
- m_voiceList.append(SpeechSynthesisVoice::create(platformVoices[k].get()));
+ m_voiceList.append(SpeechSynthesisVoice::create(platformVoices[k]));
return m_voiceList;
}
@@ -222,9 +222,10 @@ void SpeechSynthesis::speakingErrorOccurred(PlatformSpeechSynthesisUtterance* ut
SpeechSynthesisUtterance* SpeechSynthesis::currentSpeechUtterance() const
{
- if (!m_utteranceQueue.isEmpty())
- return m_utteranceQueue.first().get();
- return 0;
+ if (m_utteranceQueue.isEmpty())
+ return nullptr;
+
+ return m_utteranceQueue.first();
}
const AtomicString& SpeechSynthesis::interfaceName() const
« no previous file with comments | « Source/modules/speech/SpeechRecognitionResultList.cpp ('k') | Source/modules/speech/SpeechSynthesisUtterance.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698