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

Side by Side Diff: third_party/WebKit/Source/modules/speech/SpeechSynthesis.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 Inc. All rights reserved. 2 * Copyright (C) 2013 Apple 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 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 ASSERT(utterance); 89 ASSERT(utterance);
90 90
91 utterance->setStartTime(monotonicallyIncreasingTime()); 91 utterance->setStartTime(monotonicallyIncreasingTime());
92 m_isPaused = false; 92 m_isPaused = false;
93 m_platformSpeechSynthesizer->speak(utterance->platformUtterance()); 93 m_platformSpeechSynthesizer->speak(utterance->platformUtterance());
94 } 94 }
95 95
96 void SpeechSynthesis::speak(SpeechSynthesisUtterance* utterance) { 96 void SpeechSynthesis::speak(SpeechSynthesisUtterance* utterance) {
97 ASSERT(utterance); 97 ASSERT(utterance);
98 98
99 m_utteranceQueue.append(utterance); 99 m_utteranceQueue.push_back(utterance);
100 100
101 // If the queue was empty, speak this immediately. 101 // If the queue was empty, speak this immediately.
102 if (m_utteranceQueue.size() == 1) 102 if (m_utteranceQueue.size() == 1)
103 startSpeakingImmediately(); 103 startSpeakingImmediately();
104 } 104 }
105 105
106 void SpeechSynthesis::cancel() { 106 void SpeechSynthesis::cancel() {
107 // Remove all the items from the utterance queue. The platform 107 // Remove all the items from the utterance queue. The platform
108 // may still have references to some of these utterances and may 108 // may still have references to some of these utterances and may
109 // fire events on them asynchronously. 109 // fire events on them asynchronously.
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 DEFINE_TRACE(SpeechSynthesis) { 237 DEFINE_TRACE(SpeechSynthesis) {
238 visitor->trace(m_platformSpeechSynthesizer); 238 visitor->trace(m_platformSpeechSynthesizer);
239 visitor->trace(m_voiceList); 239 visitor->trace(m_voiceList);
240 visitor->trace(m_utteranceQueue); 240 visitor->trace(m_utteranceQueue);
241 PlatformSpeechSynthesizerClient::trace(visitor); 241 PlatformSpeechSynthesizerClient::trace(visitor);
242 ContextClient::trace(visitor); 242 ContextClient::trace(visitor);
243 EventTargetWithInlineData::trace(visitor); 243 EventTargetWithInlineData::trace(visitor);
244 } 244 }
245 245
246 } // namespace blink 246 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698