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

Side by Side Diff: third_party/WebKit/Source/platform/speech/PlatformSpeechSynthesizer.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
« no previous file with comments | « third_party/WebKit/Source/platform/speech/PlatformSpeechSynthesizer.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 } 53 }
54 54
55 void PlatformSpeechSynthesizer::speak(PlatformSpeechSynthesisUtterance* utteranc e) 55 void PlatformSpeechSynthesizer::speak(PlatformSpeechSynthesisUtterance* utteranc e)
56 { 56 {
57 if (m_webSpeechSynthesizer && m_webSpeechSynthesizerClient) 57 if (m_webSpeechSynthesizer && m_webSpeechSynthesizerClient)
58 m_webSpeechSynthesizer->speak(WebSpeechSynthesisUtterance(utterance)); 58 m_webSpeechSynthesizer->speak(WebSpeechSynthesisUtterance(utterance));
59 } 59 }
60 60
61 void PlatformSpeechSynthesizer::pause() 61 void PlatformSpeechSynthesizer::pause()
62 { 62 {
63 if (m_webSpeechSynthesizer.get()) 63 if (m_webSpeechSynthesizer)
64 m_webSpeechSynthesizer->pause(); 64 m_webSpeechSynthesizer->pause();
65 } 65 }
66 66
67 void PlatformSpeechSynthesizer::resume() 67 void PlatformSpeechSynthesizer::resume()
68 { 68 {
69 if (m_webSpeechSynthesizer.get()) 69 if (m_webSpeechSynthesizer)
70 m_webSpeechSynthesizer->resume(); 70 m_webSpeechSynthesizer->resume();
71 } 71 }
72 72
73 void PlatformSpeechSynthesizer::cancel() 73 void PlatformSpeechSynthesizer::cancel()
74 { 74 {
75 if (m_webSpeechSynthesizer.get()) 75 if (m_webSpeechSynthesizer)
76 m_webSpeechSynthesizer->cancel(); 76 m_webSpeechSynthesizer->cancel();
77 } 77 }
78 78
79 void PlatformSpeechSynthesizer::setVoiceList(HeapVector<Member<PlatformSpeechSyn thesisVoice>>& voices) 79 void PlatformSpeechSynthesizer::setVoiceList(Vector<RefPtr<PlatformSpeechSynthes isVoice>>& voices)
80 { 80 {
81 m_voiceList = voices; 81 m_voiceList = voices;
82 } 82 }
83 83
84 void PlatformSpeechSynthesizer::initializeVoiceList() 84 void PlatformSpeechSynthesizer::initializeVoiceList()
85 { 85 {
86 if (m_webSpeechSynthesizer.get()) 86 if (m_webSpeechSynthesizer)
87 m_webSpeechSynthesizer->updateVoiceList(); 87 m_webSpeechSynthesizer->updateVoiceList();
88 } 88 }
89 89
90 DEFINE_TRACE(PlatformSpeechSynthesizer) 90 DEFINE_TRACE(PlatformSpeechSynthesizer)
91 { 91 {
92 visitor->trace(m_speechSynthesizerClient); 92 visitor->trace(m_speechSynthesizerClient);
93 visitor->trace(m_voiceList);
94 visitor->trace(m_webSpeechSynthesizerClient); 93 visitor->trace(m_webSpeechSynthesizerClient);
95 } 94 }
96 95
97 } // namespace blink 96 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/speech/PlatformSpeechSynthesizer.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698