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

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

Issue 2743023002: Migrate WTF::Deque::append() to ::push_back() (Closed)
Patch Set: rebase Created 3 years, 9 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 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 true)); 88 true));
89 } 89 }
90 90
91 void PlatformSpeechSynthesizerMock::speak( 91 void PlatformSpeechSynthesizerMock::speak(
92 PlatformSpeechSynthesisUtterance* utterance) { 92 PlatformSpeechSynthesisUtterance* utterance) {
93 if (!m_currentUtterance) { 93 if (!m_currentUtterance) {
94 m_currentUtterance = utterance; 94 m_currentUtterance = utterance;
95 speakNow(); 95 speakNow();
96 return; 96 return;
97 } 97 }
98 m_queuedUtterances.append(utterance); 98 m_queuedUtterances.push_back(utterance);
99 } 99 }
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());
(...skipping 28 matching lines...) Expand all
137 client()->didResumeSpeaking(m_currentUtterance); 137 client()->didResumeSpeaking(m_currentUtterance);
138 } 138 }
139 139
140 DEFINE_TRACE(PlatformSpeechSynthesizerMock) { 140 DEFINE_TRACE(PlatformSpeechSynthesizerMock) {
141 visitor->trace(m_currentUtterance); 141 visitor->trace(m_currentUtterance);
142 visitor->trace(m_queuedUtterances); 142 visitor->trace(m_queuedUtterances);
143 PlatformSpeechSynthesizer::trace(visitor); 143 PlatformSpeechSynthesizer::trace(visitor);
144 } 144 }
145 145
146 } // namespace blink 146 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/modules/speech/SpeechSynthesis.cpp ('k') | third_party/WebKit/Source/modules/vr/VRController.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698