| 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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 | 47 |
| 48 PlatformSpeechSynthesizerMock::~PlatformSpeechSynthesizerMock() | 48 PlatformSpeechSynthesizerMock::~PlatformSpeechSynthesizerMock() |
| 49 { | 49 { |
| 50 m_speakingFinishedTimer.stop(); | 50 m_speakingFinishedTimer.stop(); |
| 51 } | 51 } |
| 52 | 52 |
| 53 void PlatformSpeechSynthesizerMock::speakingFinished(Timer<PlatformSpeechSynthes
izerMock>*) | 53 void PlatformSpeechSynthesizerMock::speakingFinished(Timer<PlatformSpeechSynthes
izerMock>*) |
| 54 { | 54 { |
| 55 ASSERT(m_utterance.get()); | 55 ASSERT(m_utterance.get()); |
| 56 client()->didFinishSpeaking(m_utterance); | 56 client()->didFinishSpeaking(m_utterance); |
| 57 m_utterance = 0; | 57 m_utterance = nullptr; |
| 58 } | 58 } |
| 59 | 59 |
| 60 void PlatformSpeechSynthesizerMock::initializeVoiceList() | 60 void PlatformSpeechSynthesizerMock::initializeVoiceList() |
| 61 { | 61 { |
| 62 m_voiceList.clear(); | 62 m_voiceList.clear(); |
| 63 m_voiceList.append(PlatformSpeechSynthesisVoice::create(String("mock.voice.b
ruce"), String("bruce"), String("en-US"), true, true)); | 63 m_voiceList.append(PlatformSpeechSynthesisVoice::create(String("mock.voice.b
ruce"), String("bruce"), String("en-US"), true, true)); |
| 64 m_voiceList.append(PlatformSpeechSynthesisVoice::create(String("mock.voice.c
lark"), String("clark"), String("en-US"), true, false)); | 64 m_voiceList.append(PlatformSpeechSynthesisVoice::create(String("mock.voice.c
lark"), String("clark"), String("en-US"), true, false)); |
| 65 m_voiceList.append(PlatformSpeechSynthesisVoice::create(String("mock.voice.l
ogan"), String("logan"), String("fr-CA"), true, true)); | 65 m_voiceList.append(PlatformSpeechSynthesisVoice::create(String("mock.voice.l
ogan"), String("logan"), String("fr-CA"), true, true)); |
| 66 } | 66 } |
| 67 | 67 |
| (...skipping 11 matching lines...) Expand all Loading... |
| 79 m_speakingFinishedTimer.startOneShot(.1); | 79 m_speakingFinishedTimer.startOneShot(.1); |
| 80 } | 80 } |
| 81 | 81 |
| 82 void PlatformSpeechSynthesizerMock::cancel() | 82 void PlatformSpeechSynthesizerMock::cancel() |
| 83 { | 83 { |
| 84 if (!m_utterance) | 84 if (!m_utterance) |
| 85 return; | 85 return; |
| 86 | 86 |
| 87 m_speakingFinishedTimer.stop(); | 87 m_speakingFinishedTimer.stop(); |
| 88 client()->speakingErrorOccurred(m_utterance); | 88 client()->speakingErrorOccurred(m_utterance); |
| 89 m_utterance = 0; | 89 m_utterance = nullptr; |
| 90 } | 90 } |
| 91 | 91 |
| 92 void PlatformSpeechSynthesizerMock::pause() | 92 void PlatformSpeechSynthesizerMock::pause() |
| 93 { | 93 { |
| 94 client()->didPauseSpeaking(m_utterance); | 94 client()->didPauseSpeaking(m_utterance); |
| 95 } | 95 } |
| 96 | 96 |
| 97 void PlatformSpeechSynthesizerMock::resume() | 97 void PlatformSpeechSynthesizerMock::resume() |
| 98 { | 98 { |
| 99 client()->didResumeSpeaking(m_utterance); | 99 client()->didResumeSpeaking(m_utterance); |
| 100 } | 100 } |
| 101 | 101 |
| 102 | 102 |
| 103 } // namespace WebCore | 103 } // namespace WebCore |
| OLD | NEW |