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 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
114 | 114 |
115 // Per spec, removes all queued utterances. | 115 // Per spec, removes all queued utterances. |
116 m_queuedUtterances.clear(); | 116 m_queuedUtterances.clear(); |
117 | 117 |
118 m_speakingFinishedTimer.stop(); | 118 m_speakingFinishedTimer.stop(); |
119 m_speakingErrorOccurredTimer.startOneShot(.1, BLINK_FROM_HERE); | 119 m_speakingErrorOccurredTimer.startOneShot(.1, BLINK_FROM_HERE); |
120 } | 120 } |
121 | 121 |
122 void PlatformSpeechSynthesizerMock::pause() | 122 void PlatformSpeechSynthesizerMock::pause() |
123 { | 123 { |
| 124 if (!m_currentUtterance) |
| 125 return; |
| 126 |
124 client()->didPauseSpeaking(m_currentUtterance); | 127 client()->didPauseSpeaking(m_currentUtterance); |
125 } | 128 } |
126 | 129 |
127 void PlatformSpeechSynthesizerMock::resume() | 130 void PlatformSpeechSynthesizerMock::resume() |
128 { | 131 { |
| 132 if (!m_currentUtterance) |
| 133 return; |
| 134 |
129 client()->didResumeSpeaking(m_currentUtterance); | 135 client()->didResumeSpeaking(m_currentUtterance); |
130 } | 136 } |
131 | 137 |
132 DEFINE_TRACE(PlatformSpeechSynthesizerMock) | 138 DEFINE_TRACE(PlatformSpeechSynthesizerMock) |
133 { | 139 { |
134 visitor->trace(m_currentUtterance); | 140 visitor->trace(m_currentUtterance); |
135 visitor->trace(m_queuedUtterances); | 141 visitor->trace(m_queuedUtterances); |
136 PlatformSpeechSynthesizer::trace(visitor); | 142 PlatformSpeechSynthesizer::trace(visitor); |
137 } | 143 } |
138 | 144 |
139 } // namespace blink | 145 } // namespace blink |
OLD | NEW |