| 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 15 matching lines...) Expand all Loading... |
| 26 #include "config.h" | 26 #include "config.h" |
| 27 #include "core/platform/PlatformSpeechSynthesisUtterance.h" | 27 #include "core/platform/PlatformSpeechSynthesisUtterance.h" |
| 28 #include "core/platform/mock/PlatformSpeechSynthesizerMock.h" | 28 #include "core/platform/mock/PlatformSpeechSynthesizerMock.h" |
| 29 | 29 |
| 30 namespace WebCore { | 30 namespace WebCore { |
| 31 | 31 |
| 32 PassOwnPtr<PlatformSpeechSynthesizerMock> PlatformSpeechSynthesizerMock::create(
PlatformSpeechSynthesizerClient* client) | 32 PassOwnPtr<PlatformSpeechSynthesizerMock> PlatformSpeechSynthesizerMock::create(
PlatformSpeechSynthesizerClient* client) |
| 33 { | 33 { |
| 34 OwnPtr<PlatformSpeechSynthesizerMock> synthesizer = adoptPtr(new PlatformSpe
echSynthesizerMock(client)); | 34 OwnPtr<PlatformSpeechSynthesizerMock> synthesizer = adoptPtr(new PlatformSpe
echSynthesizerMock(client)); |
| 35 synthesizer->initializeVoiceList(); | 35 synthesizer->initializeVoiceList(); |
| 36 client->voicesDidChange(); |
| 36 return synthesizer.release(); | 37 return synthesizer.release(); |
| 37 } | 38 } |
| 38 | 39 |
| 39 PlatformSpeechSynthesizerMock::PlatformSpeechSynthesizerMock(PlatformSpeechSynth
esizerClient* client) | 40 PlatformSpeechSynthesizerMock::PlatformSpeechSynthesizerMock(PlatformSpeechSynth
esizerClient* client) |
| 40 : PlatformSpeechSynthesizer(client) | 41 : PlatformSpeechSynthesizer(client) |
| 41 , m_speakingFinishedTimer(this, &PlatformSpeechSynthesizerMock::speakingFini
shed) | 42 , m_speakingFinishedTimer(this, &PlatformSpeechSynthesizerMock::speakingFini
shed) |
| 42 { | 43 { |
| 43 } | 44 } |
| 44 | 45 |
| 45 PlatformSpeechSynthesizerMock::~PlatformSpeechSynthesizerMock() | 46 PlatformSpeechSynthesizerMock::~PlatformSpeechSynthesizerMock() |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 client()->didPauseSpeaking(m_utterance); | 92 client()->didPauseSpeaking(m_utterance); |
| 92 } | 93 } |
| 93 | 94 |
| 94 void PlatformSpeechSynthesizerMock::resume() | 95 void PlatformSpeechSynthesizerMock::resume() |
| 95 { | 96 { |
| 96 client()->didResumeSpeaking(m_utterance); | 97 client()->didResumeSpeaking(m_utterance); |
| 97 } | 98 } |
| 98 | 99 |
| 99 | 100 |
| 100 } // namespace WebCore | 101 } // namespace WebCore |
| OLD | NEW |