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

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

Issue 1617383003: Move PlatformSpeechSynthesisVoice off the heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix oilpan compilation Created 4 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 23 matching lines...) Expand all
34 , m_client(client) 34 , m_client(client)
35 { 35 {
36 } 36 }
37 37
38 WebSpeechSynthesizerClientImpl::~WebSpeechSynthesizerClientImpl() 38 WebSpeechSynthesizerClientImpl::~WebSpeechSynthesizerClientImpl()
39 { 39 {
40 } 40 }
41 41
42 void WebSpeechSynthesizerClientImpl::setVoiceList(const WebVector<WebSpeechSynth esisVoice>& voices) 42 void WebSpeechSynthesizerClientImpl::setVoiceList(const WebVector<WebSpeechSynth esisVoice>& voices)
43 { 43 {
44 HeapVector<Member<PlatformSpeechSynthesisVoice>> outVoices; 44 Vector<RefPtr<PlatformSpeechSynthesisVoice>> outVoices;
45 for (size_t i = 0; i < voices.size(); i++) 45 for (size_t i = 0; i < voices.size(); i++)
46 outVoices.append(voices[i]); 46 outVoices.append(voices[i]);
47 m_synthesizer->setVoiceList(outVoices); 47 m_synthesizer->setVoiceList(outVoices);
48 m_client->voicesDidChange(); 48 m_client->voicesDidChange();
49 } 49 }
50 50
51 void WebSpeechSynthesizerClientImpl::didStartSpeaking(const WebSpeechSynthesisUt terance& utterance) 51 void WebSpeechSynthesizerClientImpl::didStartSpeaking(const WebSpeechSynthesisUt terance& utterance)
52 { 52 {
53 m_client->didStartSpeaking(utterance); 53 m_client->didStartSpeaking(utterance);
54 } 54 }
(...skipping 28 matching lines...) Expand all
83 m_client->boundaryEventOccurred(utterance, SpeechSentenceBoundary, charIndex ); 83 m_client->boundaryEventOccurred(utterance, SpeechSentenceBoundary, charIndex );
84 } 84 }
85 85
86 DEFINE_TRACE(WebSpeechSynthesizerClientImpl) 86 DEFINE_TRACE(WebSpeechSynthesizerClientImpl)
87 { 87 {
88 visitor->trace(m_synthesizer); 88 visitor->trace(m_synthesizer);
89 visitor->trace(m_client); 89 visitor->trace(m_client);
90 } 90 }
91 91
92 } // namespace blink 92 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698