| OLD | NEW |
| 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 are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 | 33 |
| 34 #include "core/platform/PlatformSpeechSynthesisUtterance.h" | 34 #include "core/platform/PlatformSpeechSynthesisUtterance.h" |
| 35 #include "core/platform/PlatformSpeechSynthesisVoice.h" | 35 #include "core/platform/PlatformSpeechSynthesisVoice.h" |
| 36 #include "core/platform/chromium/support/WebSpeechSynthesizerClientImpl.h" | 36 #include "core/platform/chromium/support/WebSpeechSynthesizerClientImpl.h" |
| 37 #include <public/Platform.h> | 37 #include <public/Platform.h> |
| 38 #include <public/WebSpeechSynthesisUtterance.h> | 38 #include <public/WebSpeechSynthesisUtterance.h> |
| 39 #include <public/WebSpeechSynthesizer.h> | 39 #include <public/WebSpeechSynthesizer.h> |
| 40 #include <public/WebSpeechSynthesizerClient.h> | 40 #include <public/WebSpeechSynthesizerClient.h> |
| 41 #include <wtf/RetainPtr.h> | 41 #include <wtf/RetainPtr.h> |
| 42 | 42 |
| 43 #if ENABLE(SPEECH_SYNTHESIS) | |
| 44 | |
| 45 namespace WebCore { | 43 namespace WebCore { |
| 46 | 44 |
| 47 PlatformSpeechSynthesizer::PlatformSpeechSynthesizer(PlatformSpeechSynthesizerCl
ient* client) | 45 PlatformSpeechSynthesizer::PlatformSpeechSynthesizer(PlatformSpeechSynthesizerCl
ient* client) |
| 48 : m_speechSynthesizerClient(client) | 46 : m_speechSynthesizerClient(client) |
| 49 { | 47 { |
| 50 m_webSpeechSynthesizerClient = adoptPtr(new WebSpeechSynthesizerClientImpl(t
his, client)); | 48 m_webSpeechSynthesizerClient = adoptPtr(new WebSpeechSynthesizerClientImpl(t
his, client)); |
| 51 m_webSpeechSynthesizer = adoptPtr(WebKit::Platform::current()->createSpeechS
ynthesizer(m_webSpeechSynthesizerClient.get())); | 49 m_webSpeechSynthesizer = adoptPtr(WebKit::Platform::current()->createSpeechS
ynthesizer(m_webSpeechSynthesizerClient.get())); |
| 52 } | 50 } |
| 53 | 51 |
| 54 PlatformSpeechSynthesizer::~PlatformSpeechSynthesizer() | 52 PlatformSpeechSynthesizer::~PlatformSpeechSynthesizer() |
| (...skipping 26 matching lines...) Expand all Loading... |
| 81 m_webSpeechSynthesizer->resume(); | 79 m_webSpeechSynthesizer->resume(); |
| 82 } | 80 } |
| 83 | 81 |
| 84 void PlatformSpeechSynthesizer::cancel() | 82 void PlatformSpeechSynthesizer::cancel() |
| 85 { | 83 { |
| 86 if (m_webSpeechSynthesizer.get()) | 84 if (m_webSpeechSynthesizer.get()) |
| 87 m_webSpeechSynthesizer->cancel(); | 85 m_webSpeechSynthesizer->cancel(); |
| 88 } | 86 } |
| 89 | 87 |
| 90 } // namespace WebCore | 88 } // namespace WebCore |
| 91 | |
| 92 #endif // ENABLE(SPEECH_SYNTHESIS) | |
| OLD | NEW |