| OLD | NEW |
| 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 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 215 if (utterance->client()) | 215 if (utterance->client()) |
| 216 handleSpeakingCompleted(static_cast<SpeechSynthesisUtterance*>(utterance
->client()), false); | 216 handleSpeakingCompleted(static_cast<SpeechSynthesisUtterance*>(utterance
->client()), false); |
| 217 } | 217 } |
| 218 | 218 |
| 219 void SpeechSynthesis::speakingErrorOccurred(PassRefPtr<PlatformSpeechSynthesisUt
terance> utterance) | 219 void SpeechSynthesis::speakingErrorOccurred(PassRefPtr<PlatformSpeechSynthesisUt
terance> utterance) |
| 220 { | 220 { |
| 221 if (utterance->client()) | 221 if (utterance->client()) |
| 222 handleSpeakingCompleted(static_cast<SpeechSynthesisUtterance*>(utterance
->client()), true); | 222 handleSpeakingCompleted(static_cast<SpeechSynthesisUtterance*>(utterance
->client()), true); |
| 223 } | 223 } |
| 224 | 224 |
| 225 SpeechSynthesisUtterance* SpeechSynthesis::currentSpeechUtterance() const | |
| 226 { | |
| 227 if (!m_utteranceQueue.isEmpty()) | |
| 228 return m_utteranceQueue.first().get(); | |
| 229 return 0; | |
| 230 } | |
| 231 | |
| 232 const AtomicString& SpeechSynthesis::interfaceName() const | 225 const AtomicString& SpeechSynthesis::interfaceName() const |
| 233 { | 226 { |
| 234 return EventTargetNames::SpeechSynthesisUtterance; | 227 return EventTargetNames::SpeechSynthesisUtterance; |
| 235 } | 228 } |
| 236 | 229 |
| 237 void SpeechSynthesis::trace(Visitor* visitor) | 230 void SpeechSynthesis::trace(Visitor* visitor) |
| 238 { | 231 { |
| 239 visitor->trace(m_voiceList); | 232 visitor->trace(m_voiceList); |
| 240 visitor->trace(m_currentSpeechUtterance); | 233 visitor->trace(m_currentSpeechUtterance); |
| 241 visitor->trace(m_utteranceQueue); | 234 visitor->trace(m_utteranceQueue); |
| 242 } | 235 } |
| 243 | 236 |
| 244 } // namespace WebCore | 237 } // namespace WebCore |
| OLD | NEW |