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

Side by Side Diff: third_party/WebKit/Source/platform/exported/WebSpeechSynthesizerClientImpl.cpp

Issue 2615813003: Migrate WTF::Vector::append() to ::push_back() [part 14 of N] (Closed)
Patch Set: rebase, small fix in FontSettings.h Created 3 years, 11 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 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google 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 * * Redistributions of source code must retain the above copyright 7 * * 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 * * Redistributions in binary form must reproduce the above copyright 9 * * 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 22 matching lines...) Expand all
33 PlatformSpeechSynthesizer* synthesizer, 33 PlatformSpeechSynthesizer* synthesizer,
34 PlatformSpeechSynthesizerClient* client) 34 PlatformSpeechSynthesizerClient* client)
35 : m_synthesizer(synthesizer), m_client(client) {} 35 : m_synthesizer(synthesizer), m_client(client) {}
36 36
37 WebSpeechSynthesizerClientImpl::~WebSpeechSynthesizerClientImpl() {} 37 WebSpeechSynthesizerClientImpl::~WebSpeechSynthesizerClientImpl() {}
38 38
39 void WebSpeechSynthesizerClientImpl::setVoiceList( 39 void WebSpeechSynthesizerClientImpl::setVoiceList(
40 const WebVector<WebSpeechSynthesisVoice>& voices) { 40 const WebVector<WebSpeechSynthesisVoice>& voices) {
41 Vector<RefPtr<PlatformSpeechSynthesisVoice>> outVoices; 41 Vector<RefPtr<PlatformSpeechSynthesisVoice>> outVoices;
42 for (size_t i = 0; i < voices.size(); i++) 42 for (size_t i = 0; i < voices.size(); i++)
43 outVoices.append(voices[i]); 43 outVoices.push_back(voices[i]);
44 m_synthesizer->setVoiceList(outVoices); 44 m_synthesizer->setVoiceList(outVoices);
45 m_client->voicesDidChange(); 45 m_client->voicesDidChange();
46 } 46 }
47 47
48 void WebSpeechSynthesizerClientImpl::didStartSpeaking( 48 void WebSpeechSynthesizerClientImpl::didStartSpeaking(
49 const WebSpeechSynthesisUtterance& utterance) { 49 const WebSpeechSynthesisUtterance& utterance) {
50 m_client->didStartSpeaking(utterance); 50 m_client->didStartSpeaking(utterance);
51 } 51 }
52 52
53 void WebSpeechSynthesizerClientImpl::didFinishSpeaking( 53 void WebSpeechSynthesizerClientImpl::didFinishSpeaking(
(...skipping 27 matching lines...) Expand all
81 unsigned charIndex) { 81 unsigned charIndex) {
82 m_client->boundaryEventOccurred(utterance, SpeechSentenceBoundary, charIndex); 82 m_client->boundaryEventOccurred(utterance, SpeechSentenceBoundary, charIndex);
83 } 83 }
84 84
85 DEFINE_TRACE(WebSpeechSynthesizerClientImpl) { 85 DEFINE_TRACE(WebSpeechSynthesizerClientImpl) {
86 visitor->trace(m_synthesizer); 86 visitor->trace(m_synthesizer);
87 visitor->trace(m_client); 87 visitor->trace(m_client);
88 } 88 }
89 89
90 } // namespace blink 90 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698