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 30 matching lines...) Expand all Loading... |
41 : PlatformSpeechSynthesizer(client) | 41 : PlatformSpeechSynthesizer(client) |
42 , m_speakingErrorOccurredTimer(this, &PlatformSpeechSynthesizerMock::speakin
gErrorOccurred) | 42 , m_speakingErrorOccurredTimer(this, &PlatformSpeechSynthesizerMock::speakin
gErrorOccurred) |
43 , m_speakingFinishedTimer(this, &PlatformSpeechSynthesizerMock::speakingFini
shed) | 43 , m_speakingFinishedTimer(this, &PlatformSpeechSynthesizerMock::speakingFini
shed) |
44 { | 44 { |
45 } | 45 } |
46 | 46 |
47 PlatformSpeechSynthesizerMock::~PlatformSpeechSynthesizerMock() | 47 PlatformSpeechSynthesizerMock::~PlatformSpeechSynthesizerMock() |
48 { | 48 { |
49 } | 49 } |
50 | 50 |
51 void PlatformSpeechSynthesizerMock::speakingErrorOccurred(Timer<PlatformSpeechSy
nthesizerMock>*) | 51 void PlatformSpeechSynthesizerMock::speakingErrorOccurred(TimerBase*) |
52 { | 52 { |
53 ASSERT(m_currentUtterance); | 53 ASSERT(m_currentUtterance); |
54 | 54 |
55 client()->speakingErrorOccurred(m_currentUtterance); | 55 client()->speakingErrorOccurred(m_currentUtterance); |
56 speakNext(); | 56 speakNext(); |
57 } | 57 } |
58 | 58 |
59 void PlatformSpeechSynthesizerMock::speakingFinished(Timer<PlatformSpeechSynthes
izerMock>*) | 59 void PlatformSpeechSynthesizerMock::speakingFinished(TimerBase*) |
60 { | 60 { |
61 ASSERT(m_currentUtterance); | 61 ASSERT(m_currentUtterance); |
62 client()->didFinishSpeaking(m_currentUtterance); | 62 client()->didFinishSpeaking(m_currentUtterance); |
63 speakNext(); | 63 speakNext(); |
64 } | 64 } |
65 | 65 |
66 void PlatformSpeechSynthesizerMock::speakNext() | 66 void PlatformSpeechSynthesizerMock::speakNext() |
67 { | 67 { |
68 if (m_speakingErrorOccurredTimer.isActive()) | 68 if (m_speakingErrorOccurredTimer.isActive()) |
69 return; | 69 return; |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
136 } | 136 } |
137 | 137 |
138 DEFINE_TRACE(PlatformSpeechSynthesizerMock) | 138 DEFINE_TRACE(PlatformSpeechSynthesizerMock) |
139 { | 139 { |
140 visitor->trace(m_currentUtterance); | 140 visitor->trace(m_currentUtterance); |
141 visitor->trace(m_queuedUtterances); | 141 visitor->trace(m_queuedUtterances); |
142 PlatformSpeechSynthesizer::trace(visitor); | 142 PlatformSpeechSynthesizer::trace(visitor); |
143 } | 143 } |
144 | 144 |
145 } // namespace blink | 145 } // namespace blink |
OLD | NEW |