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

Unified Diff: Source/core/platform/chromium/support/WebSpeechSynthesizerClientImpl.cpp

Issue 14466008: Switch speech synthesis from compile-flag to runtime-flag. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase, switch to RuntimeEnabledFeatures.in Created 7 years, 8 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/core/platform/chromium/support/WebSpeechSynthesizerClientImpl.cpp
diff --git a/Source/core/platform/chromium/support/WebSpeechSynthesizerClientImpl.cpp b/Source/core/platform/chromium/support/WebSpeechSynthesizerClientImpl.cpp
index 1196ab4dadd17a7678ba1d576c05b34c13d00f52..0b49a2fcd28650ccd9b75c37c803e6358f2996b5 100644
--- a/Source/core/platform/chromium/support/WebSpeechSynthesizerClientImpl.cpp
+++ b/Source/core/platform/chromium/support/WebSpeechSynthesizerClientImpl.cpp
@@ -31,10 +31,8 @@
namespace WebCore {
WebSpeechSynthesizerClientImpl::WebSpeechSynthesizerClientImpl(PlatformSpeechSynthesizer* synthesizer, PlatformSpeechSynthesizerClient* client)
-#if ENABLE(SPEECH_SYNTHESIS)
: m_synthesizer(synthesizer)
, m_client(client)
-#endif
{
}
@@ -44,62 +42,46 @@ WebSpeechSynthesizerClientImpl::~WebSpeechSynthesizerClientImpl()
void WebSpeechSynthesizerClientImpl::setVoiceList(const WebKit::WebVector<WebKit::WebSpeechSynthesisVoice>& voices)
{
-#if ENABLE(SPEECH_SYNTHESIS)
Vector<RefPtr<PlatformSpeechSynthesisVoice> > outVoices;
for (size_t i = 0; i < voices.size(); i++)
outVoices.append(PassRefPtr<PlatformSpeechSynthesisVoice>(voices[i]));
m_synthesizer->setVoiceList(outVoices);
m_client->voicesDidChange();
-#endif
}
void WebSpeechSynthesizerClientImpl::didStartSpeaking(const WebKit::WebSpeechSynthesisUtterance& utterance)
{
-#if ENABLE(SPEECH_SYNTHESIS)
m_client->didStartSpeaking(utterance);
-#endif
}
void WebSpeechSynthesizerClientImpl::didFinishSpeaking(const WebKit::WebSpeechSynthesisUtterance& utterance)
{
-#if ENABLE(SPEECH_SYNTHESIS)
m_client->didFinishSpeaking(utterance);
-#endif
}
void WebSpeechSynthesizerClientImpl::didPauseSpeaking(const WebKit::WebSpeechSynthesisUtterance& utterance)
{
-#if ENABLE(SPEECH_SYNTHESIS)
m_client->didPauseSpeaking(utterance);
-#endif
}
void WebSpeechSynthesizerClientImpl::didResumeSpeaking(const WebKit::WebSpeechSynthesisUtterance& utterance)
{
-#if ENABLE(SPEECH_SYNTHESIS)
m_client->didResumeSpeaking(utterance);
-#endif
}
void WebSpeechSynthesizerClientImpl::speakingErrorOccurred(const WebKit::WebSpeechSynthesisUtterance& utterance)
{
-#if ENABLE(SPEECH_SYNTHESIS)
m_client->speakingErrorOccurred(utterance);
-#endif
}
void WebSpeechSynthesizerClientImpl::wordBoundaryEventOccurred(const WebKit::WebSpeechSynthesisUtterance& utterance, unsigned charIndex)
{
-#if ENABLE(SPEECH_SYNTHESIS)
m_client->boundaryEventOccurred(utterance, SpeechWordBoundary, charIndex);
-#endif
}
void WebSpeechSynthesizerClientImpl::sentenceBoundaryEventOccurred(const WebKit::WebSpeechSynthesisUtterance& utterance, unsigned charIndex)
{
-#if ENABLE(SPEECH_SYNTHESIS)
m_client->boundaryEventOccurred(utterance, SpeechSentenceBoundary, charIndex);
-#endif
}
} // namespace WebCore

Powered by Google App Engine
This is Rietveld 408576698