| 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 30 matching lines...) Expand all Loading... |
| 41 { | 41 { |
| 42 OwnPtr<PlatformSpeechSynthesizer> synthesizer = adoptPtr(new PlatformSpeechS
ynthesizer(client)); | 42 OwnPtr<PlatformSpeechSynthesizer> synthesizer = adoptPtr(new PlatformSpeechS
ynthesizer(client)); |
| 43 synthesizer->initializeVoiceList(); | 43 synthesizer->initializeVoiceList(); |
| 44 return synthesizer.release(); | 44 return synthesizer.release(); |
| 45 } | 45 } |
| 46 | 46 |
| 47 PlatformSpeechSynthesizer::PlatformSpeechSynthesizer(PlatformSpeechSynthesizerCl
ient* client) | 47 PlatformSpeechSynthesizer::PlatformSpeechSynthesizer(PlatformSpeechSynthesizerCl
ient* client) |
| 48 : m_speechSynthesizerClient(client) | 48 : m_speechSynthesizerClient(client) |
| 49 { | 49 { |
| 50 m_webSpeechSynthesizerClient = adoptPtr(new WebSpeechSynthesizerClientImpl(t
his, client)); | 50 m_webSpeechSynthesizerClient = adoptPtr(new WebSpeechSynthesizerClientImpl(t
his, client)); |
| 51 m_webSpeechSynthesizer = adoptPtr(WebKit::Platform::current()->createSpeechS
ynthesizer(m_webSpeechSynthesizerClient.get())); | 51 m_webSpeechSynthesizer = adoptPtr(blink::Platform::current()->createSpeechSy
nthesizer(m_webSpeechSynthesizerClient.get())); |
| 52 } | 52 } |
| 53 | 53 |
| 54 PlatformSpeechSynthesizer::~PlatformSpeechSynthesizer() | 54 PlatformSpeechSynthesizer::~PlatformSpeechSynthesizer() |
| 55 { | 55 { |
| 56 } | 56 } |
| 57 | 57 |
| 58 void PlatformSpeechSynthesizer::speak(PassRefPtr<PlatformSpeechSynthesisUtteranc
e> utterance) | 58 void PlatformSpeechSynthesizer::speak(PassRefPtr<PlatformSpeechSynthesisUtteranc
e> utterance) |
| 59 { | 59 { |
| 60 if (!m_webSpeechSynthesizer || !m_webSpeechSynthesizerClient) | 60 if (!m_webSpeechSynthesizer || !m_webSpeechSynthesizerClient) |
| 61 return; | 61 return; |
| 62 | 62 |
| 63 m_webSpeechSynthesizer->speak(WebKit::WebSpeechSynthesisUtterance(utterance)
); | 63 m_webSpeechSynthesizer->speak(blink::WebSpeechSynthesisUtterance(utterance))
; |
| 64 } | 64 } |
| 65 | 65 |
| 66 void PlatformSpeechSynthesizer::pause() | 66 void PlatformSpeechSynthesizer::pause() |
| 67 { | 67 { |
| 68 if (m_webSpeechSynthesizer.get()) | 68 if (m_webSpeechSynthesizer.get()) |
| 69 m_webSpeechSynthesizer->pause(); | 69 m_webSpeechSynthesizer->pause(); |
| 70 } | 70 } |
| 71 | 71 |
| 72 void PlatformSpeechSynthesizer::resume() | 72 void PlatformSpeechSynthesizer::resume() |
| 73 { | 73 { |
| (...skipping 12 matching lines...) Expand all Loading... |
| 86 m_voiceList = voices; | 86 m_voiceList = voices; |
| 87 } | 87 } |
| 88 | 88 |
| 89 void PlatformSpeechSynthesizer::initializeVoiceList() | 89 void PlatformSpeechSynthesizer::initializeVoiceList() |
| 90 { | 90 { |
| 91 if (m_webSpeechSynthesizer.get()) | 91 if (m_webSpeechSynthesizer.get()) |
| 92 m_webSpeechSynthesizer->updateVoiceList(); | 92 m_webSpeechSynthesizer->updateVoiceList(); |
| 93 } | 93 } |
| 94 | 94 |
| 95 } // namespace WebCore | 95 } // namespace WebCore |
| OLD | NEW |