Update To 11.40.268.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / Source / platform / speech / PlatformSpeechSynthesizer.cpp
index 46aa351..e5a0b58 100644 (file)
@@ -47,7 +47,7 @@ PlatformSpeechSynthesizer::PlatformSpeechSynthesizer(PlatformSpeechSynthesizerCl
     : m_speechSynthesizerClient(client)
 {
     m_webSpeechSynthesizerClient = new WebSpeechSynthesizerClientImpl(this, client);
-    m_webSpeechSynthesizer = adoptPtr(blink::Platform::current()->createSpeechSynthesizer(m_webSpeechSynthesizerClient));
+    m_webSpeechSynthesizer = adoptPtr(Platform::current()->createSpeechSynthesizer(m_webSpeechSynthesizerClient));
 }
 
 PlatformSpeechSynthesizer::~PlatformSpeechSynthesizer()
@@ -56,10 +56,8 @@ PlatformSpeechSynthesizer::~PlatformSpeechSynthesizer()
 
 void PlatformSpeechSynthesizer::speak(PlatformSpeechSynthesisUtterance* utterance)
 {
-    if (!m_webSpeechSynthesizer || !m_webSpeechSynthesizerClient)
-        return;
-
-    m_webSpeechSynthesizer->speak(blink::WebSpeechSynthesisUtterance(utterance));
+    if (m_webSpeechSynthesizer && m_webSpeechSynthesizerClient)
+        m_webSpeechSynthesizer->speak(WebSpeechSynthesisUtterance(utterance));
 }
 
 void PlatformSpeechSynthesizer::pause()