Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(402)

Side by Side Diff: third_party/WebKit/Source/modules/speech/testing/PlatformSpeechSynthesizerMock.cpp

Issue 1362973004: Rename FROM_HERE to BLINK_FROM_HERE. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: update Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 void PlatformSpeechSynthesizerMock::speakNow() 99 void PlatformSpeechSynthesizerMock::speakNow()
100 { 100 {
101 ASSERT(m_currentUtterance); 101 ASSERT(m_currentUtterance);
102 client()->didStartSpeaking(m_currentUtterance); 102 client()->didStartSpeaking(m_currentUtterance);
103 103
104 // Fire a fake word and then sentence boundary event. 104 // Fire a fake word and then sentence boundary event.
105 client()->boundaryEventOccurred(m_currentUtterance, SpeechWordBoundary, 0); 105 client()->boundaryEventOccurred(m_currentUtterance, SpeechWordBoundary, 0);
106 client()->boundaryEventOccurred(m_currentUtterance, SpeechSentenceBoundary, m_currentUtterance->text().length()); 106 client()->boundaryEventOccurred(m_currentUtterance, SpeechSentenceBoundary, m_currentUtterance->text().length());
107 107
108 // Give the fake speech job some time so that pause and other functions have time to be called. 108 // Give the fake speech job some time so that pause and other functions have time to be called.
109 m_speakingFinishedTimer.startOneShot(.1, FROM_HERE); 109 m_speakingFinishedTimer.startOneShot(.1, BLINK_FROM_HERE);
110 } 110 }
111 111
112 void PlatformSpeechSynthesizerMock::cancel() 112 void PlatformSpeechSynthesizerMock::cancel()
113 { 113 {
114 if (!m_currentUtterance) 114 if (!m_currentUtterance)
115 return; 115 return;
116 116
117 // Per spec, removes all queued utterances. 117 // Per spec, removes all queued utterances.
118 m_queuedUtterances.clear(); 118 m_queuedUtterances.clear();
119 119
120 m_speakingFinishedTimer.stop(); 120 m_speakingFinishedTimer.stop();
121 m_speakingErrorOccurredTimer.startOneShot(.1, FROM_HERE); 121 m_speakingErrorOccurredTimer.startOneShot(.1, BLINK_FROM_HERE);
122 } 122 }
123 123
124 void PlatformSpeechSynthesizerMock::pause() 124 void PlatformSpeechSynthesizerMock::pause()
125 { 125 {
126 client()->didPauseSpeaking(m_currentUtterance); 126 client()->didPauseSpeaking(m_currentUtterance);
127 } 127 }
128 128
129 void PlatformSpeechSynthesizerMock::resume() 129 void PlatformSpeechSynthesizerMock::resume()
130 { 130 {
131 client()->didResumeSpeaking(m_currentUtterance); 131 client()->didResumeSpeaking(m_currentUtterance);
132 } 132 }
133 133
134 DEFINE_TRACE(PlatformSpeechSynthesizerMock) 134 DEFINE_TRACE(PlatformSpeechSynthesizerMock)
135 { 135 {
136 visitor->trace(m_currentUtterance); 136 visitor->trace(m_currentUtterance);
137 visitor->trace(m_queuedUtterances); 137 visitor->trace(m_queuedUtterances);
138 PlatformSpeechSynthesizer::trace(visitor); 138 PlatformSpeechSynthesizer::trace(visitor);
139 } 139 }
140 140
141 } // namespace blink 141 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698