Changeset 146277 in webkit


Ignore:
Timestamp:
Mar 19, 2013 4:26:08 PM (11 years ago)
Author:
dmazzoni@google.com
Message:

Implement Web Speech Synthesis for Chromium
https://bugs.webkit.org/show_bug.cgi?id=111695

Reviewed by Adam Barth.

Source/Platform:

Exposes a platform API that the embedder can implement to
provide speech synthesis for the Chromium port.

  • Platform.gypi:
  • chromium/public/Platform.h:

(WebKit):
(Platform):
(WebKit::Platform::speechSynthesizer):

  • chromium/public/WebSpeechSynthesisUtterance.h: Added.

(WebKit):
(WebSpeechSynthesisUtterance):
(WebKit::WebSpeechSynthesisUtterance::WebSpeechSynthesisUtterance):
(WebKit::WebSpeechSynthesisUtterance::~WebSpeechSynthesisUtterance):
(WebKit::WebSpeechSynthesisUtterance::operator=):
(WebKit::WebSpeechSynthesisUtterance::isNull):

  • chromium/public/WebSpeechSynthesisVoice.h: Added.

(WebCore):
(WebKit):
(WebSpeechSynthesisVoice):
(WebKit::WebSpeechSynthesisVoice::WebSpeechSynthesisVoice):
(WebKit::WebSpeechSynthesisVoice::~WebSpeechSynthesisVoice):
(WebKit::WebSpeechSynthesisVoice::operator=):

  • chromium/public/WebSpeechSynthesizer.h: Added.

(WebKit):
(WebSpeechSynthesizer):
(WebKit::WebSpeechSynthesizer::~WebSpeechSynthesizer):

  • chromium/public/WebSpeechSynthesizerClient.h: Added.

(WebKit):
(WebSpeechSynthesizerClient):
(WebKit::WebSpeechSynthesizerClient::~WebSpeechSynthesizerClient):

Source/WebCore:

Straightforward implementation of speech synthesis
for Chromium by exposing interfaces for the platform
to implement.

  • Modules/speech/SpeechSynthesis.cpp:

(WebCore::SpeechSynthesis::boundaryEventOccurred):
(WebCore::SpeechSynthesis::didStartSpeaking):
(WebCore::SpeechSynthesis::didPauseSpeaking):
(WebCore::SpeechSynthesis::didResumeSpeaking):
(WebCore::SpeechSynthesis::didFinishSpeaking):
(WebCore::SpeechSynthesis::speakingErrorOccurred):
(WebCore):

  • Modules/speech/SpeechSynthesis.h:

(SpeechSynthesis):

  • Modules/speech/SpeechSynthesisUtterance.cpp:

(WebCore::SpeechSynthesisUtterance::SpeechSynthesisUtterance):
(WebCore):
(WebCore::SpeechSynthesisUtterance::~SpeechSynthesisUtterance):
(WebCore::SpeechSynthesisUtterance::setVoice):

  • Modules/speech/SpeechSynthesisUtterance.h:

(SpeechSynthesisUtterance):
(WebCore::SpeechSynthesisUtterance::text):
(WebCore::SpeechSynthesisUtterance::setText):
(WebCore::SpeechSynthesisUtterance::lang):
(WebCore::SpeechSynthesisUtterance::setLang):
(WebCore::SpeechSynthesisUtterance::volume):
(WebCore::SpeechSynthesisUtterance::setVolume):
(WebCore::SpeechSynthesisUtterance::rate):
(WebCore::SpeechSynthesisUtterance::setRate):
(WebCore::SpeechSynthesisUtterance::pitch):
(WebCore::SpeechSynthesisUtterance::setPitch):
(WebCore::SpeechSynthesisUtterance::startTime):
(WebCore::SpeechSynthesisUtterance::setStartTime):
(WebCore::SpeechSynthesisUtterance::platformUtterance):

  • Modules/speech/SpeechSynthesisVoice.h:

(WebCore::SpeechSynthesisVoice::~SpeechSynthesisVoice):

  • WebCore.exp.in:
  • WebCore.gypi:
  • platform/PlatformSpeechSynthesis.h:

(PlatformSpeechSynthesis):

  • platform/PlatformSpeechSynthesisUtterance.cpp:

(WebCore):
(WebCore::PlatformSpeechSynthesisUtterance::create):

  • platform/PlatformSpeechSynthesisUtterance.h:

(PlatformSpeechSynthesisUtterance):
(WebCore::PlatformSpeechSynthesisUtterance::setClient):

  • platform/PlatformSpeechSynthesisVoice.cpp:

(WebCore):
(WebCore::PlatformSpeechSynthesisVoice::create):
(WebCore::PlatformSpeechSynthesisVoice::PlatformSpeechSynthesisVoice):

  • platform/PlatformSpeechSynthesisVoice.h:

(PlatformSpeechSynthesisVoice):
(WebCore::PlatformSpeechSynthesisVoice::setVoiceURI):
(WebCore::PlatformSpeechSynthesisVoice::setName):
(WebCore::PlatformSpeechSynthesisVoice::setLang):
(WebCore::PlatformSpeechSynthesisVoice::setLocalService):
(WebCore::PlatformSpeechSynthesisVoice::setIsDefault):

  • platform/PlatformSpeechSynthesizer.cpp:

(WebCore::PlatformSpeechSynthesizer::create):
(WebCore::PlatformSpeechSynthesizer::setVoiceList):
(WebCore):

  • platform/PlatformSpeechSynthesizer.h:

(WebKit):
(PlatformSpeechSynthesizerClient):
(PlatformSpeechSynthesizer):

  • platform/chromium/PlatformSpeechSynthesizerChromium.cpp: Added.

(WebCore):
(WebCore::PlatformSpeechSynthesizer::PlatformSpeechSynthesizer):
(WebCore::PlatformSpeechSynthesizer::~PlatformSpeechSynthesizer):
(WebCore::PlatformSpeechSynthesizer::initializeVoiceList):
(WebCore::PlatformSpeechSynthesizer::speak):
(WebCore::PlatformSpeechSynthesizer::pause):
(WebCore::PlatformSpeechSynthesizer::resume):
(WebCore::PlatformSpeechSynthesizer::cancel):

  • platform/chromium/support/WebSpeechSynthesisUtterance.cpp: Added.

(WebKit):
(WebKit::WebSpeechSynthesisUtterance::WebSpeechSynthesisUtterance):
(WebKit::WebSpeechSynthesisUtterance::operator=):
(WebKit::WebSpeechSynthesisUtterance::assign):
(WebKit::WebSpeechSynthesisUtterance::reset):
(WebKit::WebSpeechSynthesisUtterance::operator PassRefPtr<PlatformSpeechSynthesisUtterance>):
(WebKit::WebSpeechSynthesisUtterance::operator PlatformSpeechSynthesisUtterance*):
(WebKit::WebSpeechSynthesisUtterance::text):
(WebKit::WebSpeechSynthesisUtterance::lang):
(WebKit::WebSpeechSynthesisUtterance::voice):
(WebKit::WebSpeechSynthesisUtterance::volume):
(WebKit::WebSpeechSynthesisUtterance::rate):
(WebKit::WebSpeechSynthesisUtterance::pitch):
(WebKit::WebSpeechSynthesisUtterance::startTime):

  • platform/chromium/support/WebSpeechSynthesisVoice.cpp: Added.

(WebKit):
(WebKit::WebSpeechSynthesisVoice::assign):
(WebKit::WebSpeechSynthesisVoice::reset):
(WebKit::WebSpeechSynthesisVoice::setVoiceURI):
(WebKit::WebSpeechSynthesisVoice::setName):
(WebKit::WebSpeechSynthesisVoice::setLanguage):
(WebKit::WebSpeechSynthesisVoice::setIsLocalService):
(WebKit::WebSpeechSynthesisVoice::setIsDefault):
(WebKit::WebSpeechSynthesisVoice::operator PassRefPtr<WebCore::PlatformSpeechSynthesisVoice>):

  • platform/chromium/support/WebSpeechSynthesizerClientImpl.cpp: Added.

(WebCore):
(WebCore::WebSpeechSynthesizerClientImpl::WebSpeechSynthesizerClientImpl):
(WebCore::WebSpeechSynthesizerClientImpl::~WebSpeechSynthesizerClientImpl):
(WebCore::WebSpeechSynthesizerClientImpl::setVoiceList):
(WebCore::WebSpeechSynthesizerClientImpl::didStartSpeaking):
(WebCore::WebSpeechSynthesizerClientImpl::didFinishSpeaking):
(WebCore::WebSpeechSynthesizerClientImpl::didPauseSpeaking):
(WebCore::WebSpeechSynthesizerClientImpl::didResumeSpeaking):
(WebCore::WebSpeechSynthesizerClientImpl::speakingErrorOccurred):
(WebCore::WebSpeechSynthesizerClientImpl::wordBoundaryEventOccurred):
(WebCore::WebSpeechSynthesizerClientImpl::sentenceBoundaryEventOccurred):

  • platform/chromium/support/WebSpeechSynthesizerClientImpl.h: Added.

(WebCore):
(WebSpeechSynthesizerClientImpl):

  • platform/mac/PlatformSpeechSynthesizerMac.mm:

(-[WebSpeechSynthesisWrapper speakUtterance:WebCore::]):
(-[WebSpeechSynthesisWrapper speechSynthesizer:didFinishSpeaking:]):
(WebCore::PlatformSpeechSynthesizer::PlatformSpeechSynthesizer):
(WebCore):
(WebCore::PlatformSpeechSynthesizer::~PlatformSpeechSynthesizer):
(WebCore::PlatformSpeechSynthesizer::speak):

  • platform/mock/PlatformSpeechSynthesizerMock.cpp:

(WebCore::PlatformSpeechSynthesizerMock::PlatformSpeechSynthesizerMock):
(WebCore::PlatformSpeechSynthesizerMock::speakingFinished):
(WebCore::PlatformSpeechSynthesizerMock::speak):

  • platform/mock/PlatformSpeechSynthesizerMock.h:

(PlatformSpeechSynthesizerMock):

Location:
trunk/Source
Files:
9 added
22 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/Platform/ChangeLog

    r146251 r146277  
     12013-03-19  Dominic Mazzoni  <dmazzoni@google.com>
     2
     3        Implement Web Speech Synthesis for Chromium
     4        https://bugs.webkit.org/show_bug.cgi?id=111695
     5
     6        Reviewed by Adam Barth.
     7
     8        Exposes a platform API that the embedder can implement to
     9        provide speech synthesis for the Chromium port.
     10
     11        * Platform.gypi:
     12        * chromium/public/Platform.h:
     13        (WebKit):
     14        (Platform):
     15        (WebKit::Platform::speechSynthesizer):
     16        * chromium/public/WebSpeechSynthesisUtterance.h: Added.
     17        (WebKit):
     18        (WebSpeechSynthesisUtterance):
     19        (WebKit::WebSpeechSynthesisUtterance::WebSpeechSynthesisUtterance):
     20        (WebKit::WebSpeechSynthesisUtterance::~WebSpeechSynthesisUtterance):
     21        (WebKit::WebSpeechSynthesisUtterance::operator=):
     22        (WebKit::WebSpeechSynthesisUtterance::isNull):
     23        * chromium/public/WebSpeechSynthesisVoice.h: Added.
     24        (WebCore):
     25        (WebKit):
     26        (WebSpeechSynthesisVoice):
     27        (WebKit::WebSpeechSynthesisVoice::WebSpeechSynthesisVoice):
     28        (WebKit::WebSpeechSynthesisVoice::~WebSpeechSynthesisVoice):
     29        (WebKit::WebSpeechSynthesisVoice::operator=):
     30        * chromium/public/WebSpeechSynthesizer.h: Added.
     31        (WebKit):
     32        (WebSpeechSynthesizer):
     33        (WebKit::WebSpeechSynthesizer::~WebSpeechSynthesizer):
     34        * chromium/public/WebSpeechSynthesizerClient.h: Added.
     35        (WebKit):
     36        (WebSpeechSynthesizerClient):
     37        (WebKit::WebSpeechSynthesizerClient::~WebSpeechSynthesizerClient):
     38
    1392013-03-19  Mark Pilgrim  <pilgrim@chromium.org>
    240
  • trunk/Source/Platform/Platform.gypi

    r146163 r146277  
    130130            'chromium/public/WebSocketStreamHandleClient.h',
    131131            'chromium/public/WebSolidColorLayer.h',
     132            'chromium/public/WebSpeechSynthesizer.h',
     133            'chromium/public/WebSpeechSynthesizerClient.h',
     134            'chromium/public/WebSpeechSynthesisUtterance.h',
     135            'chromium/public/WebSpeechSynthesisVoice.h',
    132136            'chromium/public/WebStorageArea.h',
    133137            'chromium/public/WebStorageNamespace.h',
  • trunk/Source/Platform/chromium/public/Platform.h

    r144827 r146277  
    4242#include "WebGraphicsContext3D.h"
    4343#include "WebLocalizedString.h"
     44#include "WebSpeechSynthesizer.h"
    4445#include "WebString.h"
    4546#include "WebVector.h"
     
    7071class WebSandboxSupport;
    7172class WebSocketStreamHandle;
     73class WebSpeechSynthesizer;
     74class WebSpeechSynthesizerClient;
    7275class WebStorageNamespace;
    7376class WebUnitTestSupport;
     
    116119    virtual WebHyphenator* hyphenator() { return 0; }
    117120
     121    // May return null.
     122    virtual WebSpeechSynthesizer* createSpeechSynthesizer(WebSpeechSynthesizerClient*) { return 0; }
    118123
    119124    // Audio --------------------------------------------------------------
  • trunk/Source/WebCore/ChangeLog

    r146276 r146277  
     12013-03-19  Dominic Mazzoni  <dmazzoni@google.com>
     2
     3        Implement Web Speech Synthesis for Chromium
     4        https://bugs.webkit.org/show_bug.cgi?id=111695
     5
     6        Reviewed by Adam Barth.
     7
     8        Straightforward implementation of speech synthesis
     9        for Chromium by exposing interfaces for the platform
     10        to implement.
     11
     12        * Modules/speech/SpeechSynthesis.cpp:
     13        (WebCore::SpeechSynthesis::boundaryEventOccurred):
     14        (WebCore::SpeechSynthesis::didStartSpeaking):
     15        (WebCore::SpeechSynthesis::didPauseSpeaking):
     16        (WebCore::SpeechSynthesis::didResumeSpeaking):
     17        (WebCore::SpeechSynthesis::didFinishSpeaking):
     18        (WebCore::SpeechSynthesis::speakingErrorOccurred):
     19        (WebCore):
     20        * Modules/speech/SpeechSynthesis.h:
     21        (SpeechSynthesis):
     22        * Modules/speech/SpeechSynthesisUtterance.cpp:
     23        (WebCore::SpeechSynthesisUtterance::SpeechSynthesisUtterance):
     24        (WebCore):
     25        (WebCore::SpeechSynthesisUtterance::~SpeechSynthesisUtterance):
     26        (WebCore::SpeechSynthesisUtterance::setVoice):
     27        * Modules/speech/SpeechSynthesisUtterance.h:
     28        (SpeechSynthesisUtterance):
     29        (WebCore::SpeechSynthesisUtterance::text):
     30        (WebCore::SpeechSynthesisUtterance::setText):
     31        (WebCore::SpeechSynthesisUtterance::lang):
     32        (WebCore::SpeechSynthesisUtterance::setLang):
     33        (WebCore::SpeechSynthesisUtterance::volume):
     34        (WebCore::SpeechSynthesisUtterance::setVolume):
     35        (WebCore::SpeechSynthesisUtterance::rate):
     36        (WebCore::SpeechSynthesisUtterance::setRate):
     37        (WebCore::SpeechSynthesisUtterance::pitch):
     38        (WebCore::SpeechSynthesisUtterance::setPitch):
     39        (WebCore::SpeechSynthesisUtterance::startTime):
     40        (WebCore::SpeechSynthesisUtterance::setStartTime):
     41        (WebCore::SpeechSynthesisUtterance::platformUtterance):
     42        * Modules/speech/SpeechSynthesisVoice.h:
     43        (WebCore::SpeechSynthesisVoice::~SpeechSynthesisVoice):
     44        * WebCore.exp.in:
     45        * WebCore.gypi:
     46        * platform/PlatformSpeechSynthesis.h:
     47        (PlatformSpeechSynthesis):
     48        * platform/PlatformSpeechSynthesisUtterance.cpp:
     49        (WebCore):
     50        (WebCore::PlatformSpeechSynthesisUtterance::create):
     51        * platform/PlatformSpeechSynthesisUtterance.h:
     52        (PlatformSpeechSynthesisUtterance):
     53        (WebCore::PlatformSpeechSynthesisUtterance::setClient):
     54        * platform/PlatformSpeechSynthesisVoice.cpp:
     55        (WebCore):
     56        (WebCore::PlatformSpeechSynthesisVoice::create):
     57        (WebCore::PlatformSpeechSynthesisVoice::PlatformSpeechSynthesisVoice):
     58        * platform/PlatformSpeechSynthesisVoice.h:
     59        (PlatformSpeechSynthesisVoice):
     60        (WebCore::PlatformSpeechSynthesisVoice::setVoiceURI):
     61        (WebCore::PlatformSpeechSynthesisVoice::setName):
     62        (WebCore::PlatformSpeechSynthesisVoice::setLang):
     63        (WebCore::PlatformSpeechSynthesisVoice::setLocalService):
     64        (WebCore::PlatformSpeechSynthesisVoice::setIsDefault):
     65        * platform/PlatformSpeechSynthesizer.cpp:
     66        (WebCore::PlatformSpeechSynthesizer::create):
     67        (WebCore::PlatformSpeechSynthesizer::setVoiceList):
     68        (WebCore):
     69        * platform/PlatformSpeechSynthesizer.h:
     70        (WebKit):
     71        (PlatformSpeechSynthesizerClient):
     72        (PlatformSpeechSynthesizer):
     73        * platform/chromium/PlatformSpeechSynthesizerChromium.cpp: Added.
     74        (WebCore):
     75        (WebCore::PlatformSpeechSynthesizer::PlatformSpeechSynthesizer):
     76        (WebCore::PlatformSpeechSynthesizer::~PlatformSpeechSynthesizer):
     77        (WebCore::PlatformSpeechSynthesizer::initializeVoiceList):
     78        (WebCore::PlatformSpeechSynthesizer::speak):
     79        (WebCore::PlatformSpeechSynthesizer::pause):
     80        (WebCore::PlatformSpeechSynthesizer::resume):
     81        (WebCore::PlatformSpeechSynthesizer::cancel):
     82        * platform/chromium/support/WebSpeechSynthesisUtterance.cpp: Added.
     83        (WebKit):
     84        (WebKit::WebSpeechSynthesisUtterance::WebSpeechSynthesisUtterance):
     85        (WebKit::WebSpeechSynthesisUtterance::operator=):
     86        (WebKit::WebSpeechSynthesisUtterance::assign):
     87        (WebKit::WebSpeechSynthesisUtterance::reset):
     88        (WebKit::WebSpeechSynthesisUtterance::operator PassRefPtr<PlatformSpeechSynthesisUtterance>):
     89        (WebKit::WebSpeechSynthesisUtterance::operator PlatformSpeechSynthesisUtterance*):
     90        (WebKit::WebSpeechSynthesisUtterance::text):
     91        (WebKit::WebSpeechSynthesisUtterance::lang):
     92        (WebKit::WebSpeechSynthesisUtterance::voice):
     93        (WebKit::WebSpeechSynthesisUtterance::volume):
     94        (WebKit::WebSpeechSynthesisUtterance::rate):
     95        (WebKit::WebSpeechSynthesisUtterance::pitch):
     96        (WebKit::WebSpeechSynthesisUtterance::startTime):
     97        * platform/chromium/support/WebSpeechSynthesisVoice.cpp: Added.
     98        (WebKit):
     99        (WebKit::WebSpeechSynthesisVoice::assign):
     100        (WebKit::WebSpeechSynthesisVoice::reset):
     101        (WebKit::WebSpeechSynthesisVoice::setVoiceURI):
     102        (WebKit::WebSpeechSynthesisVoice::setName):
     103        (WebKit::WebSpeechSynthesisVoice::setLanguage):
     104        (WebKit::WebSpeechSynthesisVoice::setIsLocalService):
     105        (WebKit::WebSpeechSynthesisVoice::setIsDefault):
     106        (WebKit::WebSpeechSynthesisVoice::operator PassRefPtr<WebCore::PlatformSpeechSynthesisVoice>):
     107        * platform/chromium/support/WebSpeechSynthesizerClientImpl.cpp: Added.
     108        (WebCore):
     109        (WebCore::WebSpeechSynthesizerClientImpl::WebSpeechSynthesizerClientImpl):
     110        (WebCore::WebSpeechSynthesizerClientImpl::~WebSpeechSynthesizerClientImpl):
     111        (WebCore::WebSpeechSynthesizerClientImpl::setVoiceList):
     112        (WebCore::WebSpeechSynthesizerClientImpl::didStartSpeaking):
     113        (WebCore::WebSpeechSynthesizerClientImpl::didFinishSpeaking):
     114        (WebCore::WebSpeechSynthesizerClientImpl::didPauseSpeaking):
     115        (WebCore::WebSpeechSynthesizerClientImpl::didResumeSpeaking):
     116        (WebCore::WebSpeechSynthesizerClientImpl::speakingErrorOccurred):
     117        (WebCore::WebSpeechSynthesizerClientImpl::wordBoundaryEventOccurred):
     118        (WebCore::WebSpeechSynthesizerClientImpl::sentenceBoundaryEventOccurred):
     119        * platform/chromium/support/WebSpeechSynthesizerClientImpl.h: Added.
     120        (WebCore):
     121        (WebSpeechSynthesizerClientImpl):
     122        * platform/mac/PlatformSpeechSynthesizerMac.mm:
     123        (-[WebSpeechSynthesisWrapper speakUtterance:WebCore::]):
     124        (-[WebSpeechSynthesisWrapper speechSynthesizer:didFinishSpeaking:]):
     125        (WebCore::PlatformSpeechSynthesizer::PlatformSpeechSynthesizer):
     126        (WebCore):
     127        (WebCore::PlatformSpeechSynthesizer::~PlatformSpeechSynthesizer):
     128        (WebCore::PlatformSpeechSynthesizer::speak):
     129        * platform/mock/PlatformSpeechSynthesizerMock.cpp:
     130        (WebCore::PlatformSpeechSynthesizerMock::PlatformSpeechSynthesizerMock):
     131        (WebCore::PlatformSpeechSynthesizerMock::speakingFinished):
     132        (WebCore::PlatformSpeechSynthesizerMock::speak):
     133        * platform/mock/PlatformSpeechSynthesizerMock.h:
     134        (PlatformSpeechSynthesizerMock):
     135
    11362013-03-19  Ryosuke Niwa  <rniwa@webkit.org>
    2137
  • trunk/Source/WebCore/Modules/speech/SpeechSynthesis.cpp

    r144703 r146277  
    2929#if ENABLE(SPEECH_SYNTHESIS)
    3030
    31 #include "PlatformSpeechSynthesis.h"
    3231#include "PlatformSpeechSynthesisVoice.h"
     32#include "PlatformSpeechSynthesizer.h"
    3333#include "SpeechSynthesisEvent.h"
    3434#include "SpeechSynthesisUtterance.h"
     
    153153}
    154154   
    155 void SpeechSynthesis::boundaryEventOccurred(const PlatformSpeechSynthesisUtterance* utterance, SpeechBoundary boundary, unsigned charIndex)
     155void SpeechSynthesis::boundaryEventOccurred(PassRefPtr<PlatformSpeechSynthesisUtterance> utterance, SpeechBoundary boundary, unsigned charIndex)
    156156{
    157157    DEFINE_STATIC_LOCAL(const String, wordBoundaryString, (ASCIILiteral("word")));
     
    170170}
    171171
    172 void SpeechSynthesis::didStartSpeaking(const PlatformSpeechSynthesisUtterance* utterance)
    173 {
    174     fireEvent(eventNames().startEvent, static_cast<SpeechSynthesisUtterance*>(utterance->client()), 0, String());
    175 }
    176    
    177 void SpeechSynthesis::didPauseSpeaking(const PlatformSpeechSynthesisUtterance* utterance)
     172void SpeechSynthesis::didStartSpeaking(PassRefPtr<PlatformSpeechSynthesisUtterance> utterance)
     173{
     174    if (utterance->client())
     175        fireEvent(eventNames().startEvent, static_cast<SpeechSynthesisUtterance*>(utterance->client()), 0, String());
     176}
     177   
     178void SpeechSynthesis::didPauseSpeaking(PassRefPtr<PlatformSpeechSynthesisUtterance> utterance)
    178179{
    179180    m_isPaused = true;
    180     fireEvent(eventNames().pauseEvent, static_cast<SpeechSynthesisUtterance*>(utterance->client()), 0, String());
    181 }
    182 
    183 void SpeechSynthesis::didResumeSpeaking(const PlatformSpeechSynthesisUtterance* utterance)
     181    if (utterance->client())
     182        fireEvent(eventNames().pauseEvent, static_cast<SpeechSynthesisUtterance*>(utterance->client()), 0, String());
     183}
     184
     185void SpeechSynthesis::didResumeSpeaking(PassRefPtr<PlatformSpeechSynthesisUtterance> utterance)
    184186{
    185187    m_isPaused = false;
    186     fireEvent(eventNames().resumeEvent, static_cast<SpeechSynthesisUtterance*>(utterance->client()), 0, String());
    187 }
    188 
    189 void SpeechSynthesis::didFinishSpeaking(const PlatformSpeechSynthesisUtterance* utterance)
    190 {
    191     handleSpeakingCompleted(static_cast<SpeechSynthesisUtterance*>(utterance->client()), false);
    192 }
    193    
    194 void SpeechSynthesis::speakingErrorOccurred(const PlatformSpeechSynthesisUtterance* utterance)
    195 {
    196     handleSpeakingCompleted(static_cast<SpeechSynthesisUtterance*>(utterance->client()), true);
    197 }
    198    
     188    if (utterance->client())
     189        fireEvent(eventNames().resumeEvent, static_cast<SpeechSynthesisUtterance*>(utterance->client()), 0, String());
     190}
     191
     192void SpeechSynthesis::didFinishSpeaking(PassRefPtr<PlatformSpeechSynthesisUtterance> utterance)
     193{
     194    if (utterance->client())
     195        handleSpeakingCompleted(static_cast<SpeechSynthesisUtterance*>(utterance->client()), false);
     196}
     197   
     198void SpeechSynthesis::speakingErrorOccurred(PassRefPtr<PlatformSpeechSynthesisUtterance> utterance)
     199{
     200    if (utterance->client())
     201        handleSpeakingCompleted(static_cast<SpeechSynthesisUtterance*>(utterance->client()), true);
     202}
     203
    199204} // namespace WebCore
    200205
  • trunk/Source/WebCore/Modules/speech/SpeechSynthesis.h

    r144335 r146277  
    6666    // PlatformSpeechSynthesizerClient override methods.
    6767    virtual void voicesDidChange() OVERRIDE;
    68     virtual void didStartSpeaking(const PlatformSpeechSynthesisUtterance*) OVERRIDE;
    69     virtual void didPauseSpeaking(const PlatformSpeechSynthesisUtterance*) OVERRIDE;
    70     virtual void didResumeSpeaking(const PlatformSpeechSynthesisUtterance*) OVERRIDE;
    71     virtual void didFinishSpeaking(const PlatformSpeechSynthesisUtterance*) OVERRIDE;
    72     virtual void speakingErrorOccurred(const PlatformSpeechSynthesisUtterance*) OVERRIDE;
    73     virtual void boundaryEventOccurred(const PlatformSpeechSynthesisUtterance*, SpeechBoundary, unsigned charIndex) OVERRIDE;
     68    virtual void didStartSpeaking(PassRefPtr<PlatformSpeechSynthesisUtterance>) OVERRIDE;
     69    virtual void didPauseSpeaking(PassRefPtr<PlatformSpeechSynthesisUtterance>) OVERRIDE;
     70    virtual void didResumeSpeaking(PassRefPtr<PlatformSpeechSynthesisUtterance>) OVERRIDE;
     71    virtual void didFinishSpeaking(PassRefPtr<PlatformSpeechSynthesisUtterance>) OVERRIDE;
     72    virtual void speakingErrorOccurred(PassRefPtr<PlatformSpeechSynthesisUtterance>) OVERRIDE;
     73    virtual void boundaryEventOccurred(PassRefPtr<PlatformSpeechSynthesisUtterance>, SpeechBoundary, unsigned charIndex) OVERRIDE;
    7474
    7575    void startSpeakingImmediately(SpeechSynthesisUtterance*);
  • trunk/Source/WebCore/Modules/speech/SpeechSynthesisUtterance.cpp

    r144679 r146277  
    3838SpeechSynthesisUtterance::SpeechSynthesisUtterance(ScriptExecutionContext* context, const String& text)
    3939    : ContextDestructionObserver(context)
    40     , m_platformUtterance(PlatformSpeechSynthesisUtterance(this))
     40    , m_platformUtterance(PlatformSpeechSynthesisUtterance::create(this))
    4141{
    42     m_platformUtterance.setText(text);
     42    m_platformUtterance->setText(text);
     43}
     44
     45SpeechSynthesisUtterance::~SpeechSynthesisUtterance()
     46{
     47    m_platformUtterance->setClient(0);
    4348}
    4449   
     
    6570   
    6671    if (voice)
    67         m_platformUtterance.setVoice(voice->platformVoice());
     72        m_platformUtterance->setVoice(voice->platformVoice());
    6873}
    6974
  • trunk/Source/WebCore/Modules/speech/SpeechSynthesisUtterance.h

    r144679 r146277  
    4242    static PassRefPtr<SpeechSynthesisUtterance> create(ScriptExecutionContext*, const String&);
    4343   
    44     const String& text() const { return m_platformUtterance.text(); }
    45     void setText(const String& text) { m_platformUtterance.setText(text); }
     44    ~SpeechSynthesisUtterance();
    4645
    47     const String& lang() const { return m_platformUtterance.lang(); }
    48     void setLang(const String& lang) { m_platformUtterance.setLang(lang); }
     46    const String& text() const { return m_platformUtterance->text(); }
     47    void setText(const String& text) { m_platformUtterance->setText(text); }
     48
     49    const String& lang() const { return m_platformUtterance->lang(); }
     50    void setLang(const String& lang) { m_platformUtterance->setLang(lang); }
    4951
    5052    SpeechSynthesisVoice* voice() const;
    5153    void setVoice(SpeechSynthesisVoice*);
    5254
    53     float volume() const { return m_platformUtterance.volume(); }
    54     void setVolume(float volume) { m_platformUtterance.setVolume(volume); }
     55    float volume() const { return m_platformUtterance->volume(); }
     56    void setVolume(float volume) { m_platformUtterance->setVolume(volume); }
    5557
    56     float rate() const { return m_platformUtterance.rate(); }
    57     void setRate(float rate) { m_platformUtterance.setRate(rate); }
     58    float rate() const { return m_platformUtterance->rate(); }
     59    void setRate(float rate) { m_platformUtterance->setRate(rate); }
    5860
    59     float pitch() const { return m_platformUtterance.pitch(); }
    60     void setPitch(float pitch) { m_platformUtterance.setPitch(pitch); }
     61    float pitch() const { return m_platformUtterance->pitch(); }
     62    void setPitch(float pitch) { m_platformUtterance->setPitch(pitch); }
    6163
    62     double startTime() const { return m_platformUtterance.startTime(); }
    63     void setStartTime(double startTime) { m_platformUtterance.setStartTime(startTime); }
     64    double startTime() const { return m_platformUtterance->startTime(); }
     65    void setStartTime(double startTime) { m_platformUtterance->setStartTime(startTime); }
    6466   
    6567    DEFINE_ATTRIBUTE_EVENT_LISTENER(start);
     
    7678    virtual ScriptExecutionContext* scriptExecutionContext() const;
    7779
    78     const PlatformSpeechSynthesisUtterance& platformUtterance() const { return m_platformUtterance; }
     80    PlatformSpeechSynthesisUtterance* platformUtterance() const { return m_platformUtterance.get(); }
    7981
    8082private:
    8183    SpeechSynthesisUtterance(ScriptExecutionContext*, const String&);
    82     PlatformSpeechSynthesisUtterance m_platformUtterance;
     84    RefPtr<PlatformSpeechSynthesisUtterance> m_platformUtterance;
    8385    RefPtr<SpeechSynthesisVoice> m_voice;
    8486   
  • trunk/Source/WebCore/Modules/speech/SpeechSynthesisVoice.h

    r144679 r146277  
    3838class SpeechSynthesisVoice : public RefCounted<SpeechSynthesisVoice> {
    3939public:
     40    virtual ~SpeechSynthesisVoice() { }
    4041    static PassRefPtr<SpeechSynthesisVoice> create(PassRefPtr<PlatformSpeechSynthesisVoice>);
    4142   
  • trunk/Source/WebCore/WebCore.exp.in

    r146264 r146277  
    15671567#if ENABLE(SPEECH_SYNTHESIS)
    15681568__ZTVN7WebCore25PlatformSpeechSynthesizerE
     1569__ZN7WebCore25PlatformSpeechSynthesizerD2Ev
    15691570#endif
    15701571__ZTVN7WebCore28InspectorFrontendClientLocal8SettingsE
  • trunk/Source/WebCore/WebCore.gypi

    r146208 r146277  
    993993            'Modules/speech/SpeechSynthesisVoice.cpp',
    994994            'Modules/speech/SpeechSynthesisVoice.h',
    995             'Modules/speech/chromium/SpeechSynthesisChromium.cpp',
    996995            'Modules/webaudio/AudioBasicInspectorNode.cpp',
    997996            'Modules/webaudio/AudioBasicInspectorNode.h',
     
    36973696            'platform/PlatformMemoryInstrumentation.cpp',
    36983697            'platform/PlatformMemoryInstrumentation.h',
     3698            'platform/PlatformSpeechSynthesisUtterance.cpp',
     3699            'platform/PlatformSpeechSynthesisUtterance.h',
     3700            'platform/PlatformSpeechSynthesisVoice.cpp',
     3701            'platform/PlatformSpeechSynthesisVoice.h',
     3702            'platform/PlatformSpeechSynthesizer.cpp',
     3703            'platform/PlatformSpeechSynthesizer.h',
    36993704            'platform/PlatformStrategies.cpp',
    37003705            'platform/PlatformTouchEvent.h',
     
    38693874            'platform/chromium/PlatformThemeChromiumDefault.cpp',
    38703875            'platform/chromium/PlatformThemeChromiumDefault.h',
     3876            'platform/chromium/PlatformSpeechSynthesizerChromium.cpp',
    38713877            'platform/chromium/PlatformWidget.h',
    38723878            'platform/chromium/PopupContainer.cpp',
     
    74387444            'platform/chromium/support/WebScrollbarImpl.cpp',
    74397445            'platform/chromium/support/WebScrollbarImpl.h',
     7446            'platform/chromium/support/WebSpeechSynthesisUtterance.cpp',
     7447            'platform/chromium/support/WebSpeechSynthesisVoice.cpp',
     7448            'platform/chromium/support/WebSpeechSynthesizerClientImpl.cpp',
     7449            'platform/chromium/support/WebSpeechSynthesizerClientImpl.h',
    74407450            'platform/chromium/support/WebThreadSafeData.cpp',
    74417451            'platform/chromium/support/WebTransformKeyframe.cpp',
  • trunk/Source/WebCore/platform/PlatformSpeechSynthesis.h

    r142320 r146277  
    2929#if ENABLE(SPEECH_SYNTHESIS)
    3030
     31#include <wtf/PassRefPtr.h>
    3132#include <wtf/RefCounted.h>
     33#include <wtf/Vector.h>
    3234
    3335namespace WebCore {
     
    4749    PlatformSpeechSynthesis(SpeechSynthesis*);
    4850
    49     SpeechSynthesis* m_speechSynthsis;
     51    SpeechSynthesis* m_speechSynthesis;
    5052};
    5153   
  • trunk/Source/WebCore/platform/PlatformSpeechSynthesisUtterance.cpp

    r142433 r146277  
    3030
    3131namespace WebCore {
     32
     33PassRefPtr<PlatformSpeechSynthesisUtterance> PlatformSpeechSynthesisUtterance::create(PlatformSpeechSynthesisUtteranceClient* client)
     34{
     35    return adoptRef(new PlatformSpeechSynthesisUtterance(client));
     36}
    3237   
    3338PlatformSpeechSynthesisUtterance::PlatformSpeechSynthesisUtterance(PlatformSpeechSynthesisUtteranceClient* client)
  • trunk/Source/WebCore/platform/PlatformSpeechSynthesisUtterance.h

    r144679 r146277  
    3030
    3131#include "PlatformSpeechSynthesisVoice.h"
     32#include <wtf/PassRefPtr.h>
     33#include <wtf/RefCounted.h>
    3234#include <wtf/text/WTFString.h>
    3335
     
    4143};
    4244   
    43 class PlatformSpeechSynthesisUtterance {
     45class PlatformSpeechSynthesisUtterance : public RefCounted<PlatformSpeechSynthesisUtterance> {
    4446public:
    45     explicit PlatformSpeechSynthesisUtterance(PlatformSpeechSynthesisUtteranceClient*);
     47    static PassRefPtr<PlatformSpeechSynthesisUtterance> create(PlatformSpeechSynthesisUtteranceClient*);
    4648   
    4749    const String& text() const { return m_text; }
     
    7072   
    7173    PlatformSpeechSynthesisUtteranceClient* client() const { return m_client; }
     74    void setClient(PlatformSpeechSynthesisUtteranceClient* client) { m_client = client; }
    7275   
    7376private:
     77    explicit PlatformSpeechSynthesisUtterance(PlatformSpeechSynthesisUtteranceClient*);
     78
    7479    PlatformSpeechSynthesisUtteranceClient* m_client;
    7580    String m_text;
  • trunk/Source/WebCore/platform/PlatformSpeechSynthesisVoice.cpp

    r142320 r146277  
    3535    return adoptRef(new PlatformSpeechSynthesisVoice(voiceURI, name, lang, localService, isDefault));
    3636}
     37
     38PassRefPtr<PlatformSpeechSynthesisVoice> PlatformSpeechSynthesisVoice::create()
     39{
     40    return adoptRef(new PlatformSpeechSynthesisVoice());
     41}
    3742   
    3843PlatformSpeechSynthesisVoice::PlatformSpeechSynthesisVoice(const String& voiceURI, const String& name, const String& lang, bool localService, bool isDefault)
     
    4550}
    4651
     52PlatformSpeechSynthesisVoice::PlatformSpeechSynthesisVoice()
     53    : m_localService(false)
     54    , m_default(false)
     55{
     56}
     57
    4758} // namespace WebCore
    4859
  • trunk/Source/WebCore/platform/PlatformSpeechSynthesisVoice.h

    r142320 r146277  
    3838public:
    3939    static PassRefPtr<PlatformSpeechSynthesisVoice> create(const String& voiceURI, const String& name, const String& lang, bool localService, bool isDefault);
    40    
     40    static PassRefPtr<PlatformSpeechSynthesisVoice> create();
     41
    4142    const String& voiceURI() const { return m_voiceURI; }
     43    void setVoiceURI(const String& voiceURI) { m_voiceURI =voiceURI; }
     44
    4245    const String& name() const { return m_name; }
     46    void setName(const String& name) { m_name = name; }
     47
    4348    const String& lang() const { return m_lang; }
     49    void setLang(const String& lang) { m_lang = lang; }
     50
    4451    bool localService() const { return m_localService; }
     52    void setLocalService(bool localService) { m_localService = localService; }
     53
    4554    bool isDefault() const { return m_default; }
    46    
     55    void setIsDefault(bool isDefault) { m_default = isDefault; }
     56
    4757private:
    4858    PlatformSpeechSynthesisVoice(const String& voiceURI, const String& name, const String& lang, bool localService, bool isDefault);
     59    PlatformSpeechSynthesisVoice();
    4960
    5061    String m_voiceURI;
  • trunk/Source/WebCore/platform/PlatformSpeechSynthesizer.cpp

    r143136 r146277  
    3333PassOwnPtr<PlatformSpeechSynthesizer> PlatformSpeechSynthesizer::create(PlatformSpeechSynthesizerClient* client)
    3434{
    35     return adoptPtr(new PlatformSpeechSynthesizer(client));
     35    OwnPtr<PlatformSpeechSynthesizer> synthesizer = adoptPtr(new PlatformSpeechSynthesizer(client));
     36    synthesizer->initializeVoiceList();
     37    return synthesizer.release();
    3638}
    3739
    38 PlatformSpeechSynthesizer::PlatformSpeechSynthesizer(PlatformSpeechSynthesizerClient* client)
    39     : m_speechSynthesizerClient(client)
     40void PlatformSpeechSynthesizer::setVoiceList(Vector<RefPtr<PlatformSpeechSynthesisVoice> >& voices)
    4041{
    41     initializeVoiceList();
     42    m_voiceList = voices;
    4243}
    43    
     44
     45
    4446} // namespace WebCore
    4547
  • trunk/Source/WebCore/platform/PlatformSpeechSynthesizer.h

    r144335 r146277  
    3838#endif
    3939
     40#if PLATFORM(CHROMIUM)
     41namespace WebKit {
     42class WebSpeechSynthesizer;
     43class WebSpeechSynthesizerClient;
     44}
     45#endif
     46
    4047namespace WebCore {
    4148
     
    4956class PlatformSpeechSynthesizerClient {
    5057public:
    51     virtual void didStartSpeaking(const PlatformSpeechSynthesisUtterance*) = 0;
    52     virtual void didFinishSpeaking(const PlatformSpeechSynthesisUtterance*) = 0;
    53     virtual void didPauseSpeaking(const PlatformSpeechSynthesisUtterance*) = 0;
    54     virtual void didResumeSpeaking(const PlatformSpeechSynthesisUtterance*) = 0;
    55     virtual void speakingErrorOccurred(const PlatformSpeechSynthesisUtterance*) = 0;
    56     virtual void boundaryEventOccurred(const PlatformSpeechSynthesisUtterance*, SpeechBoundary, unsigned charIndex) = 0;
     58    virtual void didStartSpeaking(PassRefPtr<PlatformSpeechSynthesisUtterance>) = 0;
     59    virtual void didFinishSpeaking(PassRefPtr<PlatformSpeechSynthesisUtterance>) = 0;
     60    virtual void didPauseSpeaking(PassRefPtr<PlatformSpeechSynthesisUtterance>) = 0;
     61    virtual void didResumeSpeaking(PassRefPtr<PlatformSpeechSynthesisUtterance>) = 0;
     62    virtual void speakingErrorOccurred(PassRefPtr<PlatformSpeechSynthesisUtterance>) = 0;
     63    virtual void boundaryEventOccurred(PassRefPtr<PlatformSpeechSynthesisUtterance>, SpeechBoundary, unsigned charIndex) = 0;
    5764    virtual void voicesDidChange() = 0;
    5865protected:
     
    6471    static PassOwnPtr<PlatformSpeechSynthesizer> create(PlatformSpeechSynthesizerClient*);
    6572
    66     virtual ~PlatformSpeechSynthesizer() { }
     73    virtual ~PlatformSpeechSynthesizer();
    6774   
    6875    const Vector<RefPtr<PlatformSpeechSynthesisVoice> >& voiceList() const { return m_voiceList; }
    69     virtual void speak(const PlatformSpeechSynthesisUtterance&);
     76    virtual void speak(PassRefPtr<PlatformSpeechSynthesisUtterance>);
    7077    virtual void pause();
    7178    virtual void resume();
     
    7380   
    7481    PlatformSpeechSynthesizerClient* client() const { return m_speechSynthesizerClient; }
    75    
     82
     83    void setVoiceList(Vector<RefPtr<PlatformSpeechSynthesisVoice> >&);
     84
    7685protected:
     86    virtual void initializeVoiceList();
    7787    explicit PlatformSpeechSynthesizer(PlatformSpeechSynthesizerClient*);
    7888    Vector<RefPtr<PlatformSpeechSynthesisVoice> > m_voiceList;
     
    8090private:
    8191    PlatformSpeechSynthesizerClient* m_speechSynthesizerClient;
    82     virtual void initializeVoiceList();
    8392   
    8493#if PLATFORM(MAC)
    8594    RetainPtr<WebSpeechSynthesisWrapper> m_platformSpeechWrapper;
     95#endif
     96#if PLATFORM(CHROMIUM)
     97    OwnPtr<WebKit::WebSpeechSynthesizer> m_webSpeechSynthesizer;
     98    OwnPtr<WebKit::WebSpeechSynthesizerClient> m_webSpeechSynthesizerClient;
    8699#endif
    87100};
  • trunk/Source/WebCore/platform/mac/PlatformSpeechSynthesizerMac.mm

    r144679 r146277  
    3030#include "PlatformSpeechSynthesisVoice.h"
    3131#include <AppKit/NSSpeechSynthesizer.h>
     32#include <wtf/PassRefPtr.h>
    3233#include <wtf/RetainPtr.h>
    3334
     
    3839    WebCore::PlatformSpeechSynthesizer* m_synthesizerObject;
    3940    // Hold a Ref to the utterance so that it won't disappear until the synth is done with it.
    40     const WebCore::PlatformSpeechSynthesisUtterance* m_utterance;
     41    WebCore::PlatformSpeechSynthesisUtterance* m_utterance;
    4142   
    4243    RetainPtr<NSSpeechSynthesizer> m_synthesizer;
     
    4546
    4647- (WebSpeechSynthesisWrapper *)initWithSpeechSynthesizer:(WebCore::PlatformSpeechSynthesizer *)synthesizer;
    47 - (void)speakUtterance:(const WebCore::PlatformSpeechSynthesisUtterance *)utterance;
     48- (void)speakUtterance:(WebCore::PlatformSpeechSynthesisUtterance *)utterance;
    4849
    4950@end
     
    8283}
    8384
    84 - (void)speakUtterance:(const WebCore::PlatformSpeechSynthesisUtterance *)utterance
     85- (void)speakUtterance:(WebCore::PlatformSpeechSynthesisUtterance *)utterance
    8586{
    8687    // When speak is called we should not have an existing speech utterance outstanding.
     
    166167   
    167168    // Clear the m_utterance variable in case finish speaking kicks off a new speaking job immediately.
    168     const WebCore::PlatformSpeechSynthesisUtterance* utterance = m_utterance;
     169    WebCore::PlatformSpeechSynthesisUtterance* utterance = m_utterance;
    169170    m_utterance = 0;
    170171   
     
    188189
    189190namespace WebCore {
     191
     192PlatformSpeechSynthesizer::PlatformSpeechSynthesizer(PlatformSpeechSynthesizerClient* client)
     193    : m_speechSynthesizerClient(client)
     194{
     195}
     196
     197PlatformSpeechSynthesizer::~PlatformSpeechSynthesizer()
     198{
     199}
    190200
    191201void PlatformSpeechSynthesizer::initializeVoiceList()
     
    221231}
    222232   
    223 void PlatformSpeechSynthesizer::speak(const PlatformSpeechSynthesisUtterance& utterance)
     233void PlatformSpeechSynthesizer::speak(PassRefPtr<PlatformSpeechSynthesisUtterance> utterance)
    224234{
    225235    if (!m_platformSpeechWrapper)
    226236        m_platformSpeechWrapper.adoptNS([[WebSpeechSynthesisWrapper alloc] initWithSpeechSynthesizer:this]);
    227237   
    228     [m_platformSpeechWrapper.get() speakUtterance:&utterance];
     238    [m_platformSpeechWrapper.get() speakUtterance:utterance.get()];
    229239}
    230240
  • trunk/Source/WebCore/platform/mock/PlatformSpeechSynthesizerMock.cpp

    r145304 r146277  
    3434PassOwnPtr<PlatformSpeechSynthesizerMock> PlatformSpeechSynthesizerMock::create(PlatformSpeechSynthesizerClient* client)
    3535{
    36     return adoptPtr(new PlatformSpeechSynthesizerMock(client));
     36    OwnPtr<PlatformSpeechSynthesizerMock> synthesizer = adoptPtr(new PlatformSpeechSynthesizerMock(client));
     37    synthesizer->initializeVoiceList();
     38    return synthesizer.release();
    3739}
    3840   
     
    4042    : PlatformSpeechSynthesizer(client)
    4143    , m_speakingFinishedTimer(this, &PlatformSpeechSynthesizerMock::speakingFinished)
    42     , m_utterance(0)
    4344{
    4445}
     
    5152void PlatformSpeechSynthesizerMock::speakingFinished(Timer<PlatformSpeechSynthesizerMock>*)
    5253{
    53     ASSERT(m_utterance);
     54    ASSERT(m_utterance.get());
    5455    client()->didFinishSpeaking(m_utterance);
    5556    m_utterance = 0;
     
    6465}
    6566
    66 void PlatformSpeechSynthesizerMock::speak(const PlatformSpeechSynthesisUtterance& utterance)
     67void PlatformSpeechSynthesizerMock::speak(PassRefPtr<PlatformSpeechSynthesisUtterance> utterance)
    6768{
    6869    ASSERT(!m_utterance);
    69     m_utterance = &utterance;
     70    m_utterance = utterance;
    7071    client()->didStartSpeaking(m_utterance);
    7172   
  • trunk/Source/WebCore/platform/mock/PlatformSpeechSynthesizerMock.h

    r144244 r146277  
    4040   
    4141    virtual ~PlatformSpeechSynthesizerMock();
    42     virtual void speak(const PlatformSpeechSynthesisUtterance&);
     42    virtual void speak(PassRefPtr<PlatformSpeechSynthesisUtterance>);
    4343    virtual void pause();
    4444    virtual void resume();
     
    5151   
    5252    Timer<PlatformSpeechSynthesizerMock> m_speakingFinishedTimer;
    53     const PlatformSpeechSynthesisUtterance* m_utterance;
     53    RefPtr<PlatformSpeechSynthesisUtterance> m_utterance;
    5454};
    5555   
  • trunk/Source/WebKit/chromium/features.gypi

    r145774 r146277  
    114114      'ENABLE_SHADOW_DOM=1',
    115115      'ENABLE_SMOOTH_SCROLLING=1',
    116       'ENABLE_SPEECH_SYNTHESIS=0',
     116      'ENABLE_SPEECH_SYNTHESIS=1',
    117117      'ENABLE_SQL_DATABASE=<(enable_sql_database)',
    118118      'ENABLE_STYLE_SCOPED=1',
Note: See TracChangeset for help on using the changeset viewer.