| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Apple Computer, Inc. All rights reserved. | 2 * Copyright (C) 2013 Apple Computer, 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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 synthesizer->initializeVoiceList(); | 42 synthesizer->initializeVoiceList(); |
| 43 return synthesizer; | 43 return synthesizer; |
| 44 } | 44 } |
| 45 | 45 |
| 46 PlatformSpeechSynthesizer::PlatformSpeechSynthesizer( | 46 PlatformSpeechSynthesizer::PlatformSpeechSynthesizer( |
| 47 PlatformSpeechSynthesizerClient* client) | 47 PlatformSpeechSynthesizerClient* client) |
| 48 : m_speechSynthesizerClient(client) { | 48 : m_speechSynthesizerClient(client) { |
| 49 m_webSpeechSynthesizerClient = | 49 m_webSpeechSynthesizerClient = |
| 50 new WebSpeechSynthesizerClientImpl(this, client); | 50 new WebSpeechSynthesizerClientImpl(this, client); |
| 51 m_webSpeechSynthesizer = | 51 m_webSpeechSynthesizer = |
| 52 wrapUnique(Platform::current()->createSpeechSynthesizer( | 52 WTF::wrapUnique(Platform::current()->createSpeechSynthesizer( |
| 53 m_webSpeechSynthesizerClient)); | 53 m_webSpeechSynthesizerClient)); |
| 54 } | 54 } |
| 55 | 55 |
| 56 PlatformSpeechSynthesizer::~PlatformSpeechSynthesizer() {} | 56 PlatformSpeechSynthesizer::~PlatformSpeechSynthesizer() {} |
| 57 | 57 |
| 58 void PlatformSpeechSynthesizer::speak( | 58 void PlatformSpeechSynthesizer::speak( |
| 59 PlatformSpeechSynthesisUtterance* utterance) { | 59 PlatformSpeechSynthesisUtterance* utterance) { |
| 60 if (m_webSpeechSynthesizer && m_webSpeechSynthesizerClient) | 60 if (m_webSpeechSynthesizer && m_webSpeechSynthesizerClient) |
| 61 m_webSpeechSynthesizer->speak(WebSpeechSynthesisUtterance(utterance)); | 61 m_webSpeechSynthesizer->speak(WebSpeechSynthesisUtterance(utterance)); |
| 62 } | 62 } |
| (...skipping 22 matching lines...) Expand all Loading... |
| 85 if (m_webSpeechSynthesizer) | 85 if (m_webSpeechSynthesizer) |
| 86 m_webSpeechSynthesizer->updateVoiceList(); | 86 m_webSpeechSynthesizer->updateVoiceList(); |
| 87 } | 87 } |
| 88 | 88 |
| 89 DEFINE_TRACE(PlatformSpeechSynthesizer) { | 89 DEFINE_TRACE(PlatformSpeechSynthesizer) { |
| 90 visitor->trace(m_speechSynthesizerClient); | 90 visitor->trace(m_speechSynthesizerClient); |
| 91 visitor->trace(m_webSpeechSynthesizerClient); | 91 visitor->trace(m_webSpeechSynthesizerClient); |
| 92 } | 92 } |
| 93 | 93 |
| 94 } // namespace blink | 94 } // namespace blink |
| OLD | NEW |