| 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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 if (m_queuedUtterances.isEmpty()) { | 70 if (m_queuedUtterances.isEmpty()) { |
| 71 m_currentUtterance = nullptr; | 71 m_currentUtterance = nullptr; |
| 72 return; | 72 return; |
| 73 } | 73 } |
| 74 m_currentUtterance = m_queuedUtterances.takeFirst(); | 74 m_currentUtterance = m_queuedUtterances.takeFirst(); |
| 75 speakNow(); | 75 speakNow(); |
| 76 } | 76 } |
| 77 | 77 |
| 78 void PlatformSpeechSynthesizerMock::initializeVoiceList() { | 78 void PlatformSpeechSynthesizerMock::initializeVoiceList() { |
| 79 m_voiceList.clear(); | 79 m_voiceList.clear(); |
| 80 m_voiceList.append(PlatformSpeechSynthesisVoice::create( | 80 m_voiceList.push_back(PlatformSpeechSynthesisVoice::create( |
| 81 String("mock.voice.bruce"), String("bruce"), String("en-US"), true, | 81 String("mock.voice.bruce"), String("bruce"), String("en-US"), true, |
| 82 true)); | 82 true)); |
| 83 m_voiceList.append(PlatformSpeechSynthesisVoice::create( | 83 m_voiceList.push_back(PlatformSpeechSynthesisVoice::create( |
| 84 String("mock.voice.clark"), String("clark"), String("en-US"), true, | 84 String("mock.voice.clark"), String("clark"), String("en-US"), true, |
| 85 false)); | 85 false)); |
| 86 m_voiceList.append(PlatformSpeechSynthesisVoice::create( | 86 m_voiceList.push_back(PlatformSpeechSynthesisVoice::create( |
| 87 String("mock.voice.logan"), String("logan"), String("fr-CA"), true, | 87 String("mock.voice.logan"), String("logan"), String("fr-CA"), true, |
| 88 true)); | 88 true)); |
| 89 } | 89 } |
| 90 | 90 |
| 91 void PlatformSpeechSynthesizerMock::speak( | 91 void PlatformSpeechSynthesizerMock::speak( |
| 92 PlatformSpeechSynthesisUtterance* utterance) { | 92 PlatformSpeechSynthesisUtterance* utterance) { |
| 93 if (!m_currentUtterance) { | 93 if (!m_currentUtterance) { |
| 94 m_currentUtterance = utterance; | 94 m_currentUtterance = utterance; |
| 95 speakNow(); | 95 speakNow(); |
| 96 return; | 96 return; |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 137 client()->didResumeSpeaking(m_currentUtterance); | 137 client()->didResumeSpeaking(m_currentUtterance); |
| 138 } | 138 } |
| 139 | 139 |
| 140 DEFINE_TRACE(PlatformSpeechSynthesizerMock) { | 140 DEFINE_TRACE(PlatformSpeechSynthesizerMock) { |
| 141 visitor->trace(m_currentUtterance); | 141 visitor->trace(m_currentUtterance); |
| 142 visitor->trace(m_queuedUtterances); | 142 visitor->trace(m_queuedUtterances); |
| 143 PlatformSpeechSynthesizer::trace(visitor); | 143 PlatformSpeechSynthesizer::trace(visitor); |
| 144 } | 144 } |
| 145 | 145 |
| 146 } // namespace blink | 146 } // namespace blink |
| OLD | NEW |