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

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

Issue 2386203002: Reflow comments in Source/modules/speech and platform/speech (Closed)
Patch Set: Address comments Created 4 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 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 100
101 void PlatformSpeechSynthesizerMock::speakNow() { 101 void PlatformSpeechSynthesizerMock::speakNow() {
102 ASSERT(m_currentUtterance); 102 ASSERT(m_currentUtterance);
103 client()->didStartSpeaking(m_currentUtterance); 103 client()->didStartSpeaking(m_currentUtterance);
104 104
105 // Fire a fake word and then sentence boundary event. 105 // Fire a fake word and then sentence boundary event.
106 client()->boundaryEventOccurred(m_currentUtterance, SpeechWordBoundary, 0); 106 client()->boundaryEventOccurred(m_currentUtterance, SpeechWordBoundary, 0);
107 client()->boundaryEventOccurred(m_currentUtterance, SpeechSentenceBoundary, 107 client()->boundaryEventOccurred(m_currentUtterance, SpeechSentenceBoundary,
108 m_currentUtterance->text().length()); 108 m_currentUtterance->text().length());
109 109
110 // Give the fake speech job some time so that pause and other functions have t ime to be called. 110 // Give the fake speech job some time so that pause and other functions have
111 // time to be called.
111 m_speakingFinishedTimer.startOneShot(.1, BLINK_FROM_HERE); 112 m_speakingFinishedTimer.startOneShot(.1, BLINK_FROM_HERE);
112 } 113 }
113 114
114 void PlatformSpeechSynthesizerMock::cancel() { 115 void PlatformSpeechSynthesizerMock::cancel() {
115 if (!m_currentUtterance) 116 if (!m_currentUtterance)
116 return; 117 return;
117 118
118 // Per spec, removes all queued utterances. 119 // Per spec, removes all queued utterances.
119 m_queuedUtterances.clear(); 120 m_queuedUtterances.clear();
120 121
(...skipping 15 matching lines...) Expand all
136 client()->didResumeSpeaking(m_currentUtterance); 137 client()->didResumeSpeaking(m_currentUtterance);
137 } 138 }
138 139
139 DEFINE_TRACE(PlatformSpeechSynthesizerMock) { 140 DEFINE_TRACE(PlatformSpeechSynthesizerMock) {
140 visitor->trace(m_currentUtterance); 141 visitor->trace(m_currentUtterance);
141 visitor->trace(m_queuedUtterances); 142 visitor->trace(m_queuedUtterances);
142 PlatformSpeechSynthesizer::trace(visitor); 143 PlatformSpeechSynthesizer::trace(visitor);
143 } 144 }
144 145
145 } // namespace blink 146 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698