OLD | NEW |
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 Loading... |
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 |
OLD | NEW |