Unreviewed, rolling out r146277.
authorkbr@google.com <kbr@google.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 20 Mar 2013 00:19:23 +0000 (00:19 +0000)
committerkbr@google.com <kbr@google.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 20 Mar 2013 00:19:23 +0000 (00:19 +0000)
http://trac.webkit.org/changeset/146277
https://bugs.webkit.org/show_bug.cgi?id=111695

Broke Chromium Android build

Source/Platform:

* Platform.gypi:
* chromium/public/Platform.h:
(WebKit):
* chromium/public/WebSpeechSynthesisUtterance.h: Removed.
* chromium/public/WebSpeechSynthesisVoice.h: Removed.
* chromium/public/WebSpeechSynthesizer.h: Removed.
* chromium/public/WebSpeechSynthesizerClient.h: Removed.

Source/WebCore:

* 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::SpeechSynthesisUtterance::setVoice):
* Modules/speech/SpeechSynthesisUtterance.h:
(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):
(SpeechSynthesisUtterance):
* Modules/speech/SpeechSynthesisVoice.h:
* WebCore.exp.in:
* WebCore.gypi:
* platform/PlatformSpeechSynthesis.h:
(PlatformSpeechSynthesis):
* platform/PlatformSpeechSynthesisUtterance.cpp:
* platform/PlatformSpeechSynthesisUtterance.h:
(PlatformSpeechSynthesisUtterance):
* platform/PlatformSpeechSynthesisVoice.cpp:
(WebCore::PlatformSpeechSynthesisVoice::create):
* platform/PlatformSpeechSynthesisVoice.h:
(PlatformSpeechSynthesisVoice):
* platform/PlatformSpeechSynthesizer.cpp:
(WebCore::PlatformSpeechSynthesizer::create):
(WebCore::PlatformSpeechSynthesizer::PlatformSpeechSynthesizer):
(WebCore):
* platform/PlatformSpeechSynthesizer.h:
(PlatformSpeechSynthesizerClient):
(WebCore::PlatformSpeechSynthesizer::~PlatformSpeechSynthesizer):
(PlatformSpeechSynthesizer):
* platform/chromium/PlatformSpeechSynthesizerChromium.cpp: Removed.
* platform/chromium/support/WebSpeechSynthesisUtterance.cpp: Removed.
* platform/chromium/support/WebSpeechSynthesisVoice.cpp: Removed.
* platform/chromium/support/WebSpeechSynthesizerClientImpl.cpp: Removed.
* platform/chromium/support/WebSpeechSynthesizerClientImpl.h: Removed.
* platform/mac/PlatformSpeechSynthesizerMac.mm:
(-[WebSpeechSynthesisWrapper speakUtterance:WebCore::]):
(-[WebSpeechSynthesisWrapper speechSynthesizer:didFinishSpeaking:]):
(WebCore::PlatformSpeechSynthesizer::speak):
* platform/mock/PlatformSpeechSynthesizerMock.cpp:
(WebCore::PlatformSpeechSynthesizerMock::create):
(WebCore::PlatformSpeechSynthesizerMock::PlatformSpeechSynthesizerMock):
(WebCore::PlatformSpeechSynthesizerMock::speakingFinished):
(WebCore::PlatformSpeechSynthesizerMock::speak):
* platform/mock/PlatformSpeechSynthesizerMock.h:
(PlatformSpeechSynthesizerMock):

Source/WebKit/chromium:

* features.gypi:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@146280 268f45cc-cd09-0410-ab3c-d52691b4dbfc

32 files changed:
Source/Platform/ChangeLog
Source/Platform/Platform.gypi
Source/Platform/chromium/public/Platform.h
Source/Platform/chromium/public/WebSpeechSynthesisUtterance.h [deleted file]
Source/Platform/chromium/public/WebSpeechSynthesisVoice.h [deleted file]
Source/Platform/chromium/public/WebSpeechSynthesizer.h [deleted file]
Source/Platform/chromium/public/WebSpeechSynthesizerClient.h [deleted file]
Source/WebCore/ChangeLog
Source/WebCore/Modules/speech/SpeechSynthesis.cpp
Source/WebCore/Modules/speech/SpeechSynthesis.h
Source/WebCore/Modules/speech/SpeechSynthesisUtterance.cpp
Source/WebCore/Modules/speech/SpeechSynthesisUtterance.h
Source/WebCore/Modules/speech/SpeechSynthesisVoice.h
Source/WebCore/WebCore.exp.in
Source/WebCore/WebCore.gypi
Source/WebCore/platform/PlatformSpeechSynthesis.h
Source/WebCore/platform/PlatformSpeechSynthesisUtterance.cpp
Source/WebCore/platform/PlatformSpeechSynthesisUtterance.h
Source/WebCore/platform/PlatformSpeechSynthesisVoice.cpp
Source/WebCore/platform/PlatformSpeechSynthesisVoice.h
Source/WebCore/platform/PlatformSpeechSynthesizer.cpp
Source/WebCore/platform/PlatformSpeechSynthesizer.h
Source/WebCore/platform/chromium/PlatformSpeechSynthesizerChromium.cpp [deleted file]
Source/WebCore/platform/chromium/support/WebSpeechSynthesisUtterance.cpp [deleted file]
Source/WebCore/platform/chromium/support/WebSpeechSynthesisVoice.cpp [deleted file]
Source/WebCore/platform/chromium/support/WebSpeechSynthesizerClientImpl.cpp [deleted file]
Source/WebCore/platform/chromium/support/WebSpeechSynthesizerClientImpl.h [deleted file]
Source/WebCore/platform/mac/PlatformSpeechSynthesizerMac.mm
Source/WebCore/platform/mock/PlatformSpeechSynthesizerMock.cpp
Source/WebCore/platform/mock/PlatformSpeechSynthesizerMock.h
Source/WebKit/chromium/ChangeLog
Source/WebKit/chromium/features.gypi

index 292caab..8f75a11 100644 (file)
@@ -1,3 +1,19 @@
+2013-03-19  Kenneth Russell  <kbr@google.com>
+
+        Unreviewed, rolling out r146277.
+        http://trac.webkit.org/changeset/146277
+        https://bugs.webkit.org/show_bug.cgi?id=111695
+
+        Broke Chromium Android build
+
+        * Platform.gypi:
+        * chromium/public/Platform.h:
+        (WebKit):
+        * chromium/public/WebSpeechSynthesisUtterance.h: Removed.
+        * chromium/public/WebSpeechSynthesisVoice.h: Removed.
+        * chromium/public/WebSpeechSynthesizer.h: Removed.
+        * chromium/public/WebSpeechSynthesizerClient.h: Removed.
+
 2013-03-19  Dominic Mazzoni  <dmazzoni@google.com>
 
         Implement Web Speech Synthesis for Chromium
index 4e8393d..8f7080e 100644 (file)
             'chromium/public/WebSocketStreamHandle.h',
             'chromium/public/WebSocketStreamHandleClient.h',
             'chromium/public/WebSolidColorLayer.h',
-            'chromium/public/WebSpeechSynthesizer.h',
-            'chromium/public/WebSpeechSynthesizerClient.h',
-            'chromium/public/WebSpeechSynthesisUtterance.h',
-            'chromium/public/WebSpeechSynthesisVoice.h',
             'chromium/public/WebStorageArea.h',
             'chromium/public/WebStorageNamespace.h',
             'chromium/public/WebString.h',
index 806cc60..f2a9113 100644 (file)
@@ -41,7 +41,6 @@
 #include "WebGamepads.h"
 #include "WebGraphicsContext3D.h"
 #include "WebLocalizedString.h"
-#include "WebSpeechSynthesizer.h"
 #include "WebString.h"
 #include "WebVector.h"
 
@@ -70,8 +69,6 @@ class WebRTCPeerConnectionHandler;
 class WebRTCPeerConnectionHandlerClient;
 class WebSandboxSupport;
 class WebSocketStreamHandle;
-class WebSpeechSynthesizer;
-class WebSpeechSynthesizerClient;
 class WebStorageNamespace;
 class WebUnitTestSupport;
 class WebThemeEngine;
@@ -118,8 +115,6 @@ public:
     // Must return non-null.
     virtual WebHyphenator* hyphenator() { return 0; }
 
-    // May return null.
-    virtual WebSpeechSynthesizer* createSpeechSynthesizer(WebSpeechSynthesizerClient*) { return 0; }
 
     // Audio --------------------------------------------------------------
 
diff --git a/Source/Platform/chromium/public/WebSpeechSynthesisUtterance.h b/Source/Platform/chromium/public/WebSpeechSynthesisUtterance.h
deleted file mode 100644 (file)
index 44197f2..0000000
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
- * Copyright (C) 2013 Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *  * Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *  * Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef WebSpeechSynthesisUtterance_h
-#define WebSpeechSynthesisUtterance_h
-
-#include "WebCommon.h"
-#include "WebPrivatePtr.h"
-#include "WebString.h"
-
-namespace WebCore { class PlatformSpeechSynthesisUtterance; }
-
-namespace WebKit {
-
-class WebSpeechSynthesisUtterance {
-public:
-    WebSpeechSynthesisUtterance() { }
-    WebSpeechSynthesisUtterance(const WebSpeechSynthesisUtterance& other) { assign(other); }
-    ~WebSpeechSynthesisUtterance() { reset(); }
-
-    WebSpeechSynthesisUtterance& operator=(const WebSpeechSynthesisUtterance& other)
-    {
-        assign(other);
-        return *this;
-    }
-
-    WEBKIT_EXPORT void assign(const WebSpeechSynthesisUtterance&);
-    WEBKIT_EXPORT void reset();
-    bool isNull() const { return m_private.isNull(); }
-
-    WEBKIT_EXPORT WebString text() const;
-    WEBKIT_EXPORT WebString lang() const;
-    WEBKIT_EXPORT WebString voice() const;
-
-    // As defined in: https://dvcs.w3.org/hg/speech-api/raw-file/tip/speechapi.html
-    WEBKIT_EXPORT float volume() const; // 0...1, 1 is default
-    WEBKIT_EXPORT float rate() const; // 0.1...10, 1 is default
-    WEBKIT_EXPORT float pitch() const; // 0...2, 1 is default
-
-    WEBKIT_EXPORT double startTime() const; // In seconds.
-
-#if WEBKIT_IMPLEMENTATION
-    WebSpeechSynthesisUtterance(const PassRefPtr<WebCore::PlatformSpeechSynthesisUtterance>&);
-    WebSpeechSynthesisUtterance& operator=(WebCore::PlatformSpeechSynthesisUtterance*);
-    operator PassRefPtr<WebCore::PlatformSpeechSynthesisUtterance>() const;
-    operator WebCore::PlatformSpeechSynthesisUtterance*() const;
-#endif
-
-private:
-    WebPrivatePtr<WebCore::PlatformSpeechSynthesisUtterance> m_private;
-};
-
-} // namespace WebKit
-
-#endif // WebSpeechSynthesisUtterance_h
diff --git a/Source/Platform/chromium/public/WebSpeechSynthesisVoice.h b/Source/Platform/chromium/public/WebSpeechSynthesisVoice.h
deleted file mode 100644 (file)
index fd5a161..0000000
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * Copyright (C) 2013 Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *  * Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *  * Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef WebSpeechSynthesisVoice_h
-#define WebSpeechSynthesisVoice_h
-
-#include "WebCommon.h"
-#include "WebPrivatePtr.h"
-#include "WebString.h"
-
-namespace WebCore {
-class PlatformSpeechSynthesisVoice;
-}
-
-namespace WebKit {
-
-class WebSpeechSynthesisVoice {
-public:
-    WebSpeechSynthesisVoice() { }
-    WebSpeechSynthesisVoice(const WebSpeechSynthesisVoice& other) { assign(other); }
-    ~WebSpeechSynthesisVoice() { reset(); }
-
-    WebSpeechSynthesisVoice& operator=(const WebSpeechSynthesisVoice& other)
-    {
-        assign(other);
-        return *this;
-    }
-
-    WEBKIT_EXPORT void assign(const WebSpeechSynthesisVoice&);
-    WEBKIT_EXPORT void reset();
-
-    WEBKIT_EXPORT void setVoiceURI(const WebString&);
-    WEBKIT_EXPORT void setName(const WebString&);
-    WEBKIT_EXPORT void setLanguage(const WebString&);
-    WEBKIT_EXPORT void setIsLocalService(bool);
-    WEBKIT_EXPORT void setIsDefault(bool);
-
-#if WEBKIT_IMPLEMENTATION
-    operator WTF::PassRefPtr<WebCore::PlatformSpeechSynthesisVoice>() const;
-#endif
-
-private:
-    WebPrivatePtr<WebCore::PlatformSpeechSynthesisVoice> m_private;
-};
-
-} // namespace WebKit
-
-#endif // WebSpeechSynthesisVoice_h
diff --git a/Source/Platform/chromium/public/WebSpeechSynthesizer.h b/Source/Platform/chromium/public/WebSpeechSynthesizer.h
deleted file mode 100644 (file)
index 4c0f965..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Copyright (C) 2013 Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1.  Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer.
- * 2.  Redistributions in binary form must reproduce the above copyright
- *     notice, this list of conditions and the following disclaimer in the
- *     documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef WebSpeechSynthesizer_h
-#define WebSpeechSynthesizer_h
-
-#include "WebCommon.h"
-
-namespace WebKit {
-
-class WebSpeechSynthesizerClient;
-class WebSpeechSynthesisUtterance;
-
-class WebSpeechSynthesizer {
-public:
-    virtual ~WebSpeechSynthesizer() { }
-
-    virtual void updateVoiceList() = 0;
-
-    // OK to call with more than one utterance, will queue.
-    virtual void speak(const WebSpeechSynthesisUtterance&) = 0;
-
-    virtual void pause() = 0;
-    virtual void resume() = 0;
-    virtual void cancel() = 0;
-};
-
-} // namespace WebKit
-
-#endif // WebSpeechSynthesizer_h
diff --git a/Source/Platform/chromium/public/WebSpeechSynthesizerClient.h b/Source/Platform/chromium/public/WebSpeechSynthesizerClient.h
deleted file mode 100644 (file)
index f2b9e9c..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Copyright (C) 2013 Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1.  Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer.
- * 2.  Redistributions in binary form must reproduce the above copyright
- *     notice, this list of conditions and the following disclaimer in the
- *     documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef WebSpeechSynthesizerClient_h
-#define WebSpeechSynthesizerClient_h
-
-#include "WebSpeechSynthesisUtterance.h"
-#include "WebSpeechSynthesisVoice.h"
-#include "WebVector.h"
-
-namespace WebKit {
-
-class WebSpeechSynthesizerClient {
-public:
-    virtual ~WebSpeechSynthesizerClient() { }
-
-    virtual void setVoiceList(const WebVector<WebSpeechSynthesisVoice>&) = 0;
-    virtual void didStartSpeaking(const WebSpeechSynthesisUtterance&) = 0;
-    virtual void didPauseSpeaking(const WebSpeechSynthesisUtterance&) = 0;
-    virtual void didResumeSpeaking(const WebSpeechSynthesisUtterance&) = 0;
-    virtual void didFinishSpeaking(const WebSpeechSynthesisUtterance&) = 0;
-    virtual void speakingErrorOccurred(const WebSpeechSynthesisUtterance&) = 0;
-    virtual void wordBoundaryEventOccurred(const WebSpeechSynthesisUtterance&, unsigned charIndex) = 0;
-    virtual void sentenceBoundaryEventOccurred(const WebSpeechSynthesisUtterance&, unsigned charIndex) = 0;
-};
-
-} // namespace WebKit
-
-#endif // WebSpeechSynthesizerClient_h
index 2dad213..250bd21 100644 (file)
@@ -1,3 +1,76 @@
+2013-03-19  Kenneth Russell  <kbr@google.com>
+
+        Unreviewed, rolling out r146277.
+        http://trac.webkit.org/changeset/146277
+        https://bugs.webkit.org/show_bug.cgi?id=111695
+
+        Broke Chromium Android build
+
+        * 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::SpeechSynthesisUtterance::setVoice):
+        * Modules/speech/SpeechSynthesisUtterance.h:
+        (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):
+        (SpeechSynthesisUtterance):
+        * Modules/speech/SpeechSynthesisVoice.h:
+        * WebCore.exp.in:
+        * WebCore.gypi:
+        * platform/PlatformSpeechSynthesis.h:
+        (PlatformSpeechSynthesis):
+        * platform/PlatformSpeechSynthesisUtterance.cpp:
+        * platform/PlatformSpeechSynthesisUtterance.h:
+        (PlatformSpeechSynthesisUtterance):
+        * platform/PlatformSpeechSynthesisVoice.cpp:
+        (WebCore::PlatformSpeechSynthesisVoice::create):
+        * platform/PlatformSpeechSynthesisVoice.h:
+        (PlatformSpeechSynthesisVoice):
+        * platform/PlatformSpeechSynthesizer.cpp:
+        (WebCore::PlatformSpeechSynthesizer::create):
+        (WebCore::PlatformSpeechSynthesizer::PlatformSpeechSynthesizer):
+        (WebCore):
+        * platform/PlatformSpeechSynthesizer.h:
+        (PlatformSpeechSynthesizerClient):
+        (WebCore::PlatformSpeechSynthesizer::~PlatformSpeechSynthesizer):
+        (PlatformSpeechSynthesizer):
+        * platform/chromium/PlatformSpeechSynthesizerChromium.cpp: Removed.
+        * platform/chromium/support/WebSpeechSynthesisUtterance.cpp: Removed.
+        * platform/chromium/support/WebSpeechSynthesisVoice.cpp: Removed.
+        * platform/chromium/support/WebSpeechSynthesizerClientImpl.cpp: Removed.
+        * platform/chromium/support/WebSpeechSynthesizerClientImpl.h: Removed.
+        * platform/mac/PlatformSpeechSynthesizerMac.mm:
+        (-[WebSpeechSynthesisWrapper speakUtterance:WebCore::]):
+        (-[WebSpeechSynthesisWrapper speechSynthesizer:didFinishSpeaking:]):
+        (WebCore::PlatformSpeechSynthesizer::speak):
+        * platform/mock/PlatformSpeechSynthesizerMock.cpp:
+        (WebCore::PlatformSpeechSynthesizerMock::create):
+        (WebCore::PlatformSpeechSynthesizerMock::PlatformSpeechSynthesizerMock):
+        (WebCore::PlatformSpeechSynthesizerMock::speakingFinished):
+        (WebCore::PlatformSpeechSynthesizerMock::speak):
+        * platform/mock/PlatformSpeechSynthesizerMock.h:
+        (PlatformSpeechSynthesizerMock):
+
 2013-03-19  Antti Koivisto  <antti@apple.com>
 
         Don't compute background obscuration on every repaint
index 342d773..c4dff4e 100644 (file)
@@ -28,8 +28,8 @@
 
 #if ENABLE(SPEECH_SYNTHESIS)
 
+#include "PlatformSpeechSynthesis.h"
 #include "PlatformSpeechSynthesisVoice.h"
-#include "PlatformSpeechSynthesizer.h"
 #include "SpeechSynthesisEvent.h"
 #include "SpeechSynthesisUtterance.h"
 #include <wtf/CurrentTime.h>
@@ -152,7 +152,7 @@ void SpeechSynthesis::handleSpeakingCompleted(SpeechSynthesisUtterance* utteranc
     }
 }
     
-void SpeechSynthesis::boundaryEventOccurred(PassRefPtr<PlatformSpeechSynthesisUtterance> utterance, SpeechBoundary boundary, unsigned charIndex)
+void SpeechSynthesis::boundaryEventOccurred(const PlatformSpeechSynthesisUtterance* utterance, SpeechBoundary boundary, unsigned charIndex)
 {
     DEFINE_STATIC_LOCAL(const String, wordBoundaryString, (ASCIILiteral("word")));
     DEFINE_STATIC_LOCAL(const String, sentenceBoundaryString, (ASCIILiteral("sentence")));
@@ -169,38 +169,33 @@ void SpeechSynthesis::boundaryEventOccurred(PassRefPtr<PlatformSpeechSynthesisUt
     }
 }
 
-void SpeechSynthesis::didStartSpeaking(PassRefPtr<PlatformSpeechSynthesisUtterance> utterance)
+void SpeechSynthesis::didStartSpeaking(const PlatformSpeechSynthesisUtterance* utterance)
 {
-    if (utterance->client())
-        fireEvent(eventNames().startEvent, static_cast<SpeechSynthesisUtterance*>(utterance->client()), 0, String());
+    fireEvent(eventNames().startEvent, static_cast<SpeechSynthesisUtterance*>(utterance->client()), 0, String());
 }
     
-void SpeechSynthesis::didPauseSpeaking(PassRefPtr<PlatformSpeechSynthesisUtterance> utterance)
+void SpeechSynthesis::didPauseSpeaking(const PlatformSpeechSynthesisUtterance* utterance)
 {
     m_isPaused = true;
-    if (utterance->client())
-        fireEvent(eventNames().pauseEvent, static_cast<SpeechSynthesisUtterance*>(utterance->client()), 0, String());
+    fireEvent(eventNames().pauseEvent, static_cast<SpeechSynthesisUtterance*>(utterance->client()), 0, String());
 }
 
-void SpeechSynthesis::didResumeSpeaking(PassRefPtr<PlatformSpeechSynthesisUtterance> utterance)
+void SpeechSynthesis::didResumeSpeaking(const PlatformSpeechSynthesisUtterance* utterance)
 {
     m_isPaused = false;
-    if (utterance->client())
-        fireEvent(eventNames().resumeEvent, static_cast<SpeechSynthesisUtterance*>(utterance->client()), 0, String());
+    fireEvent(eventNames().resumeEvent, static_cast<SpeechSynthesisUtterance*>(utterance->client()), 0, String());
 }
 
-void SpeechSynthesis::didFinishSpeaking(PassRefPtr<PlatformSpeechSynthesisUtterance> utterance)
+void SpeechSynthesis::didFinishSpeaking(const PlatformSpeechSynthesisUtterance* utterance)
 {
-    if (utterance->client())
-        handleSpeakingCompleted(static_cast<SpeechSynthesisUtterance*>(utterance->client()), false);
+    handleSpeakingCompleted(static_cast<SpeechSynthesisUtterance*>(utterance->client()), false);
 }
     
-void SpeechSynthesis::speakingErrorOccurred(PassRefPtr<PlatformSpeechSynthesisUtterance> utterance)
+void SpeechSynthesis::speakingErrorOccurred(const PlatformSpeechSynthesisUtterance* utterance)
 {
-    if (utterance->client())
-        handleSpeakingCompleted(static_cast<SpeechSynthesisUtterance*>(utterance->client()), true);
+    handleSpeakingCompleted(static_cast<SpeechSynthesisUtterance*>(utterance->client()), true);
 }
-
+    
 } // namespace WebCore
 
 #endif // ENABLE(INPUT_SPEECH)
index 5393dfe..3dc9fc2 100644 (file)
@@ -65,12 +65,12 @@ private:
     
     // PlatformSpeechSynthesizerClient override methods.
     virtual void voicesDidChange() OVERRIDE;
-    virtual void didStartSpeaking(PassRefPtr<PlatformSpeechSynthesisUtterance>) OVERRIDE;
-    virtual void didPauseSpeaking(PassRefPtr<PlatformSpeechSynthesisUtterance>) OVERRIDE;
-    virtual void didResumeSpeaking(PassRefPtr<PlatformSpeechSynthesisUtterance>) OVERRIDE;
-    virtual void didFinishSpeaking(PassRefPtr<PlatformSpeechSynthesisUtterance>) OVERRIDE;
-    virtual void speakingErrorOccurred(PassRefPtr<PlatformSpeechSynthesisUtterance>) OVERRIDE;
-    virtual void boundaryEventOccurred(PassRefPtr<PlatformSpeechSynthesisUtterance>, SpeechBoundary, unsigned charIndex) OVERRIDE;
+    virtual void didStartSpeaking(const PlatformSpeechSynthesisUtterance*) OVERRIDE;
+    virtual void didPauseSpeaking(const PlatformSpeechSynthesisUtterance*) OVERRIDE;
+    virtual void didResumeSpeaking(const PlatformSpeechSynthesisUtterance*) OVERRIDE;
+    virtual void didFinishSpeaking(const PlatformSpeechSynthesisUtterance*) OVERRIDE;
+    virtual void speakingErrorOccurred(const PlatformSpeechSynthesisUtterance*) OVERRIDE;
+    virtual void boundaryEventOccurred(const PlatformSpeechSynthesisUtterance*, SpeechBoundary, unsigned charIndex) OVERRIDE;
 
     void startSpeakingImmediately(SpeechSynthesisUtterance*);
     void handleSpeakingCompleted(SpeechSynthesisUtterance*, bool errorOccurred);
index 9803e91..dc202d3 100644 (file)
@@ -37,14 +37,9 @@ PassRefPtr<SpeechSynthesisUtterance> SpeechSynthesisUtterance::create(ScriptExec
 
 SpeechSynthesisUtterance::SpeechSynthesisUtterance(ScriptExecutionContext* context, const String& text)
     : ContextDestructionObserver(context)
-    , m_platformUtterance(PlatformSpeechSynthesisUtterance::create(this))
+    , m_platformUtterance(PlatformSpeechSynthesisUtterance(this))
 {
-    m_platformUtterance->setText(text);
-}
-
-SpeechSynthesisUtterance::~SpeechSynthesisUtterance()
-{
-    m_platformUtterance->setClient(0);
+    m_platformUtterance.setText(text);
 }
     
 ScriptExecutionContext* SpeechSynthesisUtterance::scriptExecutionContext() const
@@ -69,7 +64,7 @@ void SpeechSynthesisUtterance::setVoice(SpeechSynthesisVoice* voice)
     m_voice = voice;
     
     if (voice)
-        m_platformUtterance->setVoice(voice->platformVoice());
+        m_platformUtterance.setVoice(voice->platformVoice());
 }
 
 } // namespace WebCore
index 0bfb7c4..29bfdc4 100644 (file)
@@ -41,28 +41,26 @@ class SpeechSynthesisUtterance : public PlatformSpeechSynthesisUtteranceClient,
 public:
     static PassRefPtr<SpeechSynthesisUtterance> create(ScriptExecutionContext*, const String&);
     
-    ~SpeechSynthesisUtterance();
+    const String& text() const { return m_platformUtterance.text(); }
+    void setText(const String& text) { m_platformUtterance.setText(text); }
 
-    const String& text() const { return m_platformUtterance->text(); }
-    void setText(const String& text) { m_platformUtterance->setText(text); }
-
-    const String& lang() const { return m_platformUtterance->lang(); }
-    void setLang(const String& lang) { m_platformUtterance->setLang(lang); }
+    const String& lang() const { return m_platformUtterance.lang(); }
+    void setLang(const String& lang) { m_platformUtterance.setLang(lang); }
 
     SpeechSynthesisVoice* voice() const;
     void setVoice(SpeechSynthesisVoice*);
 
-    float volume() const { return m_platformUtterance->volume(); }
-    void setVolume(float volume) { m_platformUtterance->setVolume(volume); }
+    float volume() const { return m_platformUtterance.volume(); }
+    void setVolume(float volume) { m_platformUtterance.setVolume(volume); }
 
-    float rate() const { return m_platformUtterance->rate(); }
-    void setRate(float rate) { m_platformUtterance->setRate(rate); }
+    float rate() const { return m_platformUtterance.rate(); }
+    void setRate(float rate) { m_platformUtterance.setRate(rate); }
 
-    float pitch() const { return m_platformUtterance->pitch(); }
-    void setPitch(float pitch) { m_platformUtterance->setPitch(pitch); }
+    float pitch() const { return m_platformUtterance.pitch(); }
+    void setPitch(float pitch) { m_platformUtterance.setPitch(pitch); }
 
-    double startTime() const { return m_platformUtterance->startTime(); }
-    void setStartTime(double startTime) { m_platformUtterance->setStartTime(startTime); }
+    double startTime() const { return m_platformUtterance.startTime(); }
+    void setStartTime(double startTime) { m_platformUtterance.setStartTime(startTime); }
     
     DEFINE_ATTRIBUTE_EVENT_LISTENER(start);
     DEFINE_ATTRIBUTE_EVENT_LISTENER(end);
@@ -77,11 +75,11 @@ public:
 
     virtual ScriptExecutionContext* scriptExecutionContext() const;
 
-    PlatformSpeechSynthesisUtterance* platformUtterance() const { return m_platformUtterance.get(); }
+    const PlatformSpeechSynthesisUtterance& platformUtterance() const { return m_platformUtterance; }
 
 private:
     SpeechSynthesisUtterance(ScriptExecutionContext*, const String&);
-    RefPtr<PlatformSpeechSynthesisUtterance> m_platformUtterance;
+    PlatformSpeechSynthesisUtterance m_platformUtterance;
     RefPtr<SpeechSynthesisVoice> m_voice;
     
     // EventTarget
index 76c95cb..f0f243d 100644 (file)
@@ -37,7 +37,6 @@ namespace WebCore {
 
 class SpeechSynthesisVoice : public RefCounted<SpeechSynthesisVoice> {
 public:
-    virtual ~SpeechSynthesisVoice() { }
     static PassRefPtr<SpeechSynthesisVoice> create(PassRefPtr<PlatformSpeechSynthesisVoice>);
     
     const String& voiceURI() const { return m_platformVoice->voiceURI(); }
index 243c2d4..e09a59f 100644 (file)
@@ -1566,7 +1566,6 @@ __ZTVN7WebCore17FrameLoaderClientE
 __ZTVN7WebCore25HistoryPropertyListWriterE
 #if ENABLE(SPEECH_SYNTHESIS)
 __ZTVN7WebCore25PlatformSpeechSynthesizerE
-__ZN7WebCore25PlatformSpeechSynthesizerD2Ev
 #endif
 __ZTVN7WebCore28InspectorFrontendClientLocal8SettingsE
 __ZN7WebCore16CSSParserContextC1EPNS_8DocumentERKNS_4KURLERKN3WTF6StringE
index 0057bbf..35a5165 100644 (file)
             'Modules/speech/SpeechSynthesisUtterance.h',
             'Modules/speech/SpeechSynthesisVoice.cpp',
             'Modules/speech/SpeechSynthesisVoice.h',
+            'Modules/speech/chromium/SpeechSynthesisChromium.cpp',
             'Modules/webaudio/AudioBasicInspectorNode.cpp',
             'Modules/webaudio/AudioBasicInspectorNode.h',
             'Modules/webaudio/AudioBasicProcessorNode.cpp',
             'platform/PlatformInstrumentation.h',
             'platform/PlatformMemoryInstrumentation.cpp',
             'platform/PlatformMemoryInstrumentation.h',
-            'platform/PlatformSpeechSynthesisUtterance.cpp',
-            'platform/PlatformSpeechSynthesisUtterance.h',
-            'platform/PlatformSpeechSynthesisVoice.cpp',
-            'platform/PlatformSpeechSynthesisVoice.h',
-            'platform/PlatformSpeechSynthesizer.cpp',
-            'platform/PlatformSpeechSynthesizer.h',
             'platform/PlatformStrategies.cpp',
             'platform/PlatformTouchEvent.h',
             'platform/PlatformTouchPoint.h',
             'platform/chromium/PlatformScreenChromium.cpp',
             'platform/chromium/PlatformThemeChromiumDefault.cpp',
             'platform/chromium/PlatformThemeChromiumDefault.h',
-            'platform/chromium/PlatformSpeechSynthesizerChromium.cpp',
             'platform/chromium/PlatformWidget.h',
             'platform/chromium/PopupContainer.cpp',
             'platform/chromium/PopupContainer.h',
             'platform/chromium/support/WebScrollbarThemeGeometryNative.h',
             'platform/chromium/support/WebScrollbarImpl.cpp',
             'platform/chromium/support/WebScrollbarImpl.h',
-            'platform/chromium/support/WebSpeechSynthesisUtterance.cpp',
-            'platform/chromium/support/WebSpeechSynthesisVoice.cpp',
-            'platform/chromium/support/WebSpeechSynthesizerClientImpl.cpp',
-            'platform/chromium/support/WebSpeechSynthesizerClientImpl.h',
             'platform/chromium/support/WebThreadSafeData.cpp',
             'platform/chromium/support/WebTransformKeyframe.cpp',
             'platform/chromium/support/WebURL.cpp',
index 8c944e9..21b8bc9 100644 (file)
@@ -28,9 +28,7 @@
 
 #if ENABLE(SPEECH_SYNTHESIS)
 
-#include <wtf/PassRefPtr.h>
 #include <wtf/RefCounted.h>
-#include <wtf/Vector.h>
 
 namespace WebCore {
     
@@ -48,7 +46,7 @@ public:
 private:
     PlatformSpeechSynthesis(SpeechSynthesis*);
 
-    SpeechSynthesis* m_speechSynthesis;
+    SpeechSynthesis* m_speechSynthsis;
 };
     
 } // namespace WebCore
index 5642d5f..254e92f 100644 (file)
 #if ENABLE(SPEECH_SYNTHESIS)
 
 namespace WebCore {
-
-PassRefPtr<PlatformSpeechSynthesisUtterance> PlatformSpeechSynthesisUtterance::create(PlatformSpeechSynthesisUtteranceClient* client)
-{
-    return adoptRef(new PlatformSpeechSynthesisUtterance(client));
-}
     
 PlatformSpeechSynthesisUtterance::PlatformSpeechSynthesisUtterance(PlatformSpeechSynthesisUtteranceClient* client)
     : m_client(client)
index 1a99e3f..44e6142 100644 (file)
@@ -29,8 +29,6 @@
 #if ENABLE(SPEECH_SYNTHESIS)
 
 #include "PlatformSpeechSynthesisVoice.h"
-#include <wtf/PassRefPtr.h>
-#include <wtf/RefCounted.h>
 #include <wtf/text/WTFString.h>
 
 namespace WebCore {
@@ -42,9 +40,9 @@ protected:
     virtual ~PlatformSpeechSynthesisUtteranceClient() { }
 };
     
-class PlatformSpeechSynthesisUtterance : public RefCounted<PlatformSpeechSynthesisUtterance> {
+class PlatformSpeechSynthesisUtterance {
 public:
-    static PassRefPtr<PlatformSpeechSynthesisUtterance> create(PlatformSpeechSynthesisUtteranceClient*);
+    explicit PlatformSpeechSynthesisUtterance(PlatformSpeechSynthesisUtteranceClient*);
     
     const String& text() const { return m_text; }
     void setText(const String& text) { m_text = text; }
@@ -71,11 +69,8 @@ public:
     void setStartTime(double startTime) { m_startTime = startTime; }
     
     PlatformSpeechSynthesisUtteranceClient* client() const { return m_client; }
-    void setClient(PlatformSpeechSynthesisUtteranceClient* client) { m_client = client; }
     
 private:
-    explicit PlatformSpeechSynthesisUtterance(PlatformSpeechSynthesisUtteranceClient*);
-
     PlatformSpeechSynthesisUtteranceClient* m_client;
     String m_text;
     String m_lang;
index 0526326..82eef2e 100644 (file)
@@ -34,11 +34,6 @@ PassRefPtr<PlatformSpeechSynthesisVoice> PlatformSpeechSynthesisVoice::create(co
 {
     return adoptRef(new PlatformSpeechSynthesisVoice(voiceURI, name, lang, localService, isDefault));
 }
-
-PassRefPtr<PlatformSpeechSynthesisVoice> PlatformSpeechSynthesisVoice::create()
-{
-    return adoptRef(new PlatformSpeechSynthesisVoice());
-}
     
 PlatformSpeechSynthesisVoice::PlatformSpeechSynthesisVoice(const String& voiceURI, const String& name, const String& lang, bool localService, bool isDefault)
     : m_voiceURI(voiceURI)
@@ -49,12 +44,6 @@ PlatformSpeechSynthesisVoice::PlatformSpeechSynthesisVoice(const String& voiceUR
 {
 }
 
-PlatformSpeechSynthesisVoice::PlatformSpeechSynthesisVoice()
-    : m_localService(false)
-    , m_default(false)
-{
-}
-
 } // namespace WebCore
 
 #endif // ENABLE(SPEECH_SYNTHESIS)
index f7aba8c..774e2d6 100644 (file)
@@ -37,26 +37,15 @@ namespace WebCore {
 class PlatformSpeechSynthesisVoice : public RefCounted<PlatformSpeechSynthesisVoice> {
 public:
     static PassRefPtr<PlatformSpeechSynthesisVoice> create(const String& voiceURI, const String& name, const String& lang, bool localService, bool isDefault);
-    static PassRefPtr<PlatformSpeechSynthesisVoice> create();
-
+    
     const String& voiceURI() const { return m_voiceURI; }
-    void setVoiceURI(const String& voiceURI) { m_voiceURI =voiceURI; }
-
     const String& name() const { return m_name; }
-    void setName(const String& name) { m_name = name; }
-
     const String& lang() const { return m_lang; }
-    void setLang(const String& lang) { m_lang = lang; }
-
     bool localService() const { return m_localService; }
-    void setLocalService(bool localService) { m_localService = localService; }
-
     bool isDefault() const { return m_default; }
-    void setIsDefault(bool isDefault) { m_default = isDefault; }
-
+    
 private:
     PlatformSpeechSynthesisVoice(const String& voiceURI, const String& name, const String& lang, bool localService, bool isDefault);
-    PlatformSpeechSynthesisVoice();
 
     String m_voiceURI;
     String m_name;
index f98e142..66123d5 100644 (file)
@@ -32,17 +32,15 @@ namespace WebCore {
     
 PassOwnPtr<PlatformSpeechSynthesizer> PlatformSpeechSynthesizer::create(PlatformSpeechSynthesizerClient* client)
 {
-    OwnPtr<PlatformSpeechSynthesizer> synthesizer = adoptPtr(new PlatformSpeechSynthesizer(client));
-    synthesizer->initializeVoiceList();
-    return synthesizer.release();
+    return adoptPtr(new PlatformSpeechSynthesizer(client));
 }
 
-void PlatformSpeechSynthesizer::setVoiceList(Vector<RefPtr<PlatformSpeechSynthesisVoice> >& voices)
+PlatformSpeechSynthesizer::PlatformSpeechSynthesizer(PlatformSpeechSynthesizerClient* client)
+    : m_speechSynthesizerClient(client)
 {
-    m_voiceList = voices;
+    initializeVoiceList();
 }
-
-
+    
 } // namespace WebCore
 
 #endif // ENABLE(SPEECH_SYNTHESIS)
index f0d6893..cfdc7e1 100644 (file)
 OBJC_CLASS WebSpeechSynthesisWrapper;
 #endif
 
-#if PLATFORM(CHROMIUM)
-namespace WebKit {
-class WebSpeechSynthesizer;
-class WebSpeechSynthesizerClient;
-}
-#endif
-
 namespace WebCore {
 
 enum SpeechBoundary {
@@ -55,12 +48,12 @@ class PlatformSpeechSynthesisUtterance;
 
 class PlatformSpeechSynthesizerClient {
 public:
-    virtual void didStartSpeaking(PassRefPtr<PlatformSpeechSynthesisUtterance>) = 0;
-    virtual void didFinishSpeaking(PassRefPtr<PlatformSpeechSynthesisUtterance>) = 0;
-    virtual void didPauseSpeaking(PassRefPtr<PlatformSpeechSynthesisUtterance>) = 0;
-    virtual void didResumeSpeaking(PassRefPtr<PlatformSpeechSynthesisUtterance>) = 0;
-    virtual void speakingErrorOccurred(PassRefPtr<PlatformSpeechSynthesisUtterance>) = 0;
-    virtual void boundaryEventOccurred(PassRefPtr<PlatformSpeechSynthesisUtterance>, SpeechBoundary, unsigned charIndex) = 0;
+    virtual void didStartSpeaking(const PlatformSpeechSynthesisUtterance*) = 0;
+    virtual void didFinishSpeaking(const PlatformSpeechSynthesisUtterance*) = 0;
+    virtual void didPauseSpeaking(const PlatformSpeechSynthesisUtterance*) = 0;
+    virtual void didResumeSpeaking(const PlatformSpeechSynthesisUtterance*) = 0;
+    virtual void speakingErrorOccurred(const PlatformSpeechSynthesisUtterance*) = 0;
+    virtual void boundaryEventOccurred(const PlatformSpeechSynthesisUtterance*, SpeechBoundary, unsigned charIndex) = 0;
     virtual void voicesDidChange() = 0;
 protected:
     virtual ~PlatformSpeechSynthesizerClient() { }
@@ -70,33 +63,27 @@ class PlatformSpeechSynthesizer {
 public:
     static PassOwnPtr<PlatformSpeechSynthesizer> create(PlatformSpeechSynthesizerClient*);
 
-    virtual ~PlatformSpeechSynthesizer();
+    virtual ~PlatformSpeechSynthesizer() { }
     
     const Vector<RefPtr<PlatformSpeechSynthesisVoice> >& voiceList() const { return m_voiceList; }
-    virtual void speak(PassRefPtr<PlatformSpeechSynthesisUtterance>);
+    virtual void speak(const PlatformSpeechSynthesisUtterance&);
     virtual void pause();
     virtual void resume();
     virtual void cancel();
     
     PlatformSpeechSynthesizerClient* client() const { return m_speechSynthesizerClient; }
-
-    void setVoiceList(Vector<RefPtr<PlatformSpeechSynthesisVoice> >&);
-
+    
 protected:
-    virtual void initializeVoiceList();
     explicit PlatformSpeechSynthesizer(PlatformSpeechSynthesizerClient*);
     Vector<RefPtr<PlatformSpeechSynthesisVoice> > m_voiceList;
     
 private:
     PlatformSpeechSynthesizerClient* m_speechSynthesizerClient;
+    virtual void initializeVoiceList();
     
 #if PLATFORM(MAC)
     RetainPtr<WebSpeechSynthesisWrapper> m_platformSpeechWrapper;
 #endif
-#if PLATFORM(CHROMIUM)
-    OwnPtr<WebKit::WebSpeechSynthesizer> m_webSpeechSynthesizer;
-    OwnPtr<WebKit::WebSpeechSynthesizerClient> m_webSpeechSynthesizerClient;
-#endif
 };
     
 } // namespace WebCore
diff --git a/Source/WebCore/platform/chromium/PlatformSpeechSynthesizerChromium.cpp b/Source/WebCore/platform/chromium/PlatformSpeechSynthesizerChromium.cpp
deleted file mode 100644 (file)
index d379d72..0000000
+++ /dev/null
@@ -1,92 +0,0 @@
-/*
- * Copyright (c) 2013 Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- *     * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *     * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
- *     * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-#include "PlatformSpeechSynthesizer.h"
-
-#include "PlatformSpeechSynthesisUtterance.h"
-#include "PlatformSpeechSynthesisVoice.h"
-#include "WebSpeechSynthesizerClientImpl.h"
-#include <public/Platform.h>
-#include <public/WebSpeechSynthesisUtterance.h>
-#include <public/WebSpeechSynthesizer.h>
-#include <public/WebSpeechSynthesizerClient.h>
-#include <wtf/RetainPtr.h>
-
-#if ENABLE(SPEECH_SYNTHESIS)
-
-namespace WebCore {
-
-PlatformSpeechSynthesizer::PlatformSpeechSynthesizer(PlatformSpeechSynthesizerClient* client)
-    : m_speechSynthesizerClient(client)
-{
-    m_webSpeechSynthesizerClient = adoptPtr(new WebSpeechSynthesizerClientImpl(this, client));
-    m_webSpeechSynthesizer = adoptPtr(WebKit::Platform::current()->createSpeechSynthesizer(m_webSpeechSynthesizerClient.get()));
-}
-
-PlatformSpeechSynthesizer::~PlatformSpeechSynthesizer()
-{
-}
-
-void PlatformSpeechSynthesizer::initializeVoiceList()
-{
-    if (m_webSpeechSynthesizer.get())
-        m_webSpeechSynthesizer->updateVoiceList();
-}
-
-void PlatformSpeechSynthesizer::speak(PassRefPtr<PlatformSpeechSynthesisUtterance> utterance)
-{
-    if (!m_webSpeechSynthesizer || !m_webSpeechSynthesizerClient)
-        return;
-
-    m_webSpeechSynthesizer->speak(WebKit::WebSpeechSynthesisUtterance(utterance));
-}
-
-void PlatformSpeechSynthesizer::pause()
-{
-    if (m_webSpeechSynthesizer.get())
-        m_webSpeechSynthesizer->pause();
-}
-
-void PlatformSpeechSynthesizer::resume()
-{
-    if (m_webSpeechSynthesizer.get())
-        m_webSpeechSynthesizer->resume();
-}
-
-void PlatformSpeechSynthesizer::cancel()
-{
-    if (m_webSpeechSynthesizer.get())
-        m_webSpeechSynthesizer->cancel();
-}
-
-} // namespace WebCore
-
-#endif // ENABLE(SPEECH_SYNTHESIS)
diff --git a/Source/WebCore/platform/chromium/support/WebSpeechSynthesisUtterance.cpp b/Source/WebCore/platform/chromium/support/WebSpeechSynthesisUtterance.cpp
deleted file mode 100644 (file)
index 30f92f6..0000000
+++ /dev/null
@@ -1,108 +0,0 @@
-/*
- * Copyright (C) 2013 Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1.  Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer.
- * 2.  Redistributions in binary form must reproduce the above copyright
- *     notice, this list of conditions and the following disclaimer in the
- *     documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-
-#if ENABLE(SPEECH_SYNTHESIS)
-
-#include <public/WebSpeechSynthesisUtterance.h>
-
-#include "PlatformSpeechSynthesisUtterance.h"
-#include <wtf/PassRefPtr.h>
-#include <wtf/RefPtr.h>
-
-using namespace WebCore;
-
-namespace WebKit {
-
-WebSpeechSynthesisUtterance::WebSpeechSynthesisUtterance(const PassRefPtr<PlatformSpeechSynthesisUtterance>& utterance)
-    : m_private(utterance)
-{
-}
-
-WebSpeechSynthesisUtterance& WebSpeechSynthesisUtterance::operator=(WebCore::PlatformSpeechSynthesisUtterance* utterance)
-{
-    m_private = utterance;
-    return *this;
-}
-
-void WebSpeechSynthesisUtterance::assign(const WebSpeechSynthesisUtterance& other)
-{
-    m_private = other.m_private;
-}
-
-void WebSpeechSynthesisUtterance::reset()
-{
-    m_private.reset();
-}
-
-WebSpeechSynthesisUtterance::operator PassRefPtr<PlatformSpeechSynthesisUtterance>() const
-{
-    return m_private.get();
-}
-
-WebSpeechSynthesisUtterance::operator PlatformSpeechSynthesisUtterance*() const
-{
-    return m_private.get();
-}
-
-WebString WebSpeechSynthesisUtterance::text() const
-{
-    return m_private->text();
-}
-
-WebString WebSpeechSynthesisUtterance::lang() const
-{
-    return m_private->lang();
-}
-
-WebString WebSpeechSynthesisUtterance::voice() const
-{
-    return m_private->voice() ? WebString(m_private->voice()->name()) : WebString();
-}
-
-float WebSpeechSynthesisUtterance::volume() const
-{
-    return m_private->volume();
-}
-
-float WebSpeechSynthesisUtterance::rate() const
-{
-    return m_private->rate();
-}
-
-float WebSpeechSynthesisUtterance::pitch() const
-{
-    return m_private->pitch();
-}
-
-double WebSpeechSynthesisUtterance::startTime() const
-{
-    return m_private->startTime();
-}
-
-} // namespace WebKit
-
-#endif // ENABLE(SPEECH_SYNTHESIS)
diff --git a/Source/WebCore/platform/chromium/support/WebSpeechSynthesisVoice.cpp b/Source/WebCore/platform/chromium/support/WebSpeechSynthesisVoice.cpp
deleted file mode 100644 (file)
index a95d512..0000000
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * Copyright (C) 2013 Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *  * Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *  * Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-#include <public/WebSpeechSynthesisVoice.h>
-
-#include "SpeechRecognitionAlternative.h"
-#include "SpeechSynthesisVoice.h"
-#include <wtf/PassRefPtr.h>
-#include <wtf/Vector.h>
-
-#if ENABLE(SPEECH_SYNTHESIS)
-
-namespace WebKit {
-
-void WebSpeechSynthesisVoice::assign(const WebSpeechSynthesisVoice& other)
-{
-    m_private = other.m_private;
-}
-
-void WebSpeechSynthesisVoice::reset()
-{
-    m_private.reset();
-}
-
-void WebSpeechSynthesisVoice::setVoiceURI(const WebString& voiceURI)
-{
-    m_private->setVoiceURI(voiceURI);
-}
-
-void WebSpeechSynthesisVoice::setName(const WebString& name)
-{
-    m_private->setName(name);
-}
-
-void WebSpeechSynthesisVoice::setLanguage(const WebString& language)
-{
-    m_private->setLang(language);
-}
-
-void WebSpeechSynthesisVoice::setIsLocalService(bool isLocalService)
-{
-    m_private->setLocalService(isLocalService);
-}
-
-void WebSpeechSynthesisVoice::setIsDefault(bool isDefault)
-{
-    m_private->setIsDefault(isDefault);
-}
-
-WebSpeechSynthesisVoice::operator PassRefPtr<WebCore::PlatformSpeechSynthesisVoice>() const
-{
-    return m_private.get();
-}
-
-} // namespace WebKit
-
-#endif // ENABLE(SPEECH_SYNTHESIS)
diff --git a/Source/WebCore/platform/chromium/support/WebSpeechSynthesizerClientImpl.cpp b/Source/WebCore/platform/chromium/support/WebSpeechSynthesizerClientImpl.cpp
deleted file mode 100644 (file)
index 25b42fd..0000000
+++ /dev/null
@@ -1,103 +0,0 @@
-/*
- * Copyright (C) 2013 Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *  * Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *  * Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-#include "WebSpeechSynthesizerClientImpl.h"
-
-#include "PlatformSpeechSynthesisUtterance.h"
-
-namespace WebCore {
-
-WebSpeechSynthesizerClientImpl::WebSpeechSynthesizerClientImpl(PlatformSpeechSynthesizer* synthesizer, PlatformSpeechSynthesizerClient* client)
-    : m_synthesizer(synthesizer)
-    , m_client(client)
-{
-}
-
-WebSpeechSynthesizerClientImpl::~WebSpeechSynthesizerClientImpl()
-{
-}
-
-void WebSpeechSynthesizerClientImpl::setVoiceList(const WebKit::WebVector<WebKit::WebSpeechSynthesisVoice>& voices)
-{
-#if ENABLE(SPEECH_SYNTHESIS)
-    Vector<RefPtr<PlatformSpeechSynthesisVoice> > outVoices;
-    for (size_t i = 0; i < voices.size(); i++)
-        outVoices.append(PassRefPtr<PlatformSpeechSynthesisVoice>(voices[i]));
-    m_synthesizer->setVoiceList(outVoices);
-    m_client->voicesDidChange();
-#endif
-}
-
-void WebSpeechSynthesizerClientImpl::didStartSpeaking(const WebKit::WebSpeechSynthesisUtterance& utterance)
-{
-#if ENABLE(SPEECH_SYNTHESIS)
-    m_client->didStartSpeaking(utterance);
-#endif
-}
-
-void WebSpeechSynthesizerClientImpl::didFinishSpeaking(const WebKit::WebSpeechSynthesisUtterance& utterance)
-{
-#if ENABLE(SPEECH_SYNTHESIS)
-    m_client->didFinishSpeaking(utterance);
-#endif
-}
-
-void WebSpeechSynthesizerClientImpl::didPauseSpeaking(const WebKit::WebSpeechSynthesisUtterance& utterance)
-{
-#if ENABLE(SPEECH_SYNTHESIS)
-    m_client->didPauseSpeaking(utterance);
-#endif
-}
-
-void WebSpeechSynthesizerClientImpl::didResumeSpeaking(const WebKit::WebSpeechSynthesisUtterance& utterance)
-{
-#if ENABLE(SPEECH_SYNTHESIS)
-    m_client->didResumeSpeaking(utterance);
-#endif
-}
-
-void WebSpeechSynthesizerClientImpl::speakingErrorOccurred(const WebKit::WebSpeechSynthesisUtterance& utterance)
-{
-#if ENABLE(SPEECH_SYNTHESIS)
-    m_client->speakingErrorOccurred(utterance);
-#endif
-}
-
-void WebSpeechSynthesizerClientImpl::wordBoundaryEventOccurred(const WebKit::WebSpeechSynthesisUtterance& utterance, unsigned charIndex)
-{
-#if ENABLE(SPEECH_SYNTHESIS)
-    m_client->boundaryEventOccurred(utterance, SpeechWordBoundary, charIndex);
-#endif
-}
-
-void WebSpeechSynthesizerClientImpl::sentenceBoundaryEventOccurred(const WebKit::WebSpeechSynthesisUtterance& utterance, unsigned charIndex)
-{
-#if ENABLE(SPEECH_SYNTHESIS)
-    m_client->boundaryEventOccurred(utterance, SpeechSentenceBoundary, charIndex);
-#endif
-}
-
-} // namespace WebCore
diff --git a/Source/WebCore/platform/chromium/support/WebSpeechSynthesizerClientImpl.h b/Source/WebCore/platform/chromium/support/WebSpeechSynthesizerClientImpl.h
deleted file mode 100644 (file)
index bcc833b..0000000
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Copyright (C) 2013 Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *  * Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *  * Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef WebSpeechSynthesizerClientImpl_h
-#define WebSpeechSynthesizerClientImpl_h
-
-#include "PlatformSpeechSynthesizer.h"
-#include <public/WebSpeechSynthesisUtterance.h>
-#include <public/WebSpeechSynthesisVoice.h>
-#include <public/WebSpeechSynthesizerClient.h>
-#include <wtf/HashMap.h>
-#include <wtf/Vector.h>
-
-namespace WebCore {
-
-class PlatformSpeechSynthesizer;
-class PlatformSpeechSynthesizerClient;
-
-class WebSpeechSynthesizerClientImpl : public WebKit::WebSpeechSynthesizerClient {
-public:
-    explicit WebSpeechSynthesizerClientImpl(PlatformSpeechSynthesizer*, PlatformSpeechSynthesizerClient*);
-    virtual ~WebSpeechSynthesizerClientImpl();
-
-    virtual void setVoiceList(const WebKit::WebVector<WebKit::WebSpeechSynthesisVoice>& voices);
-    virtual void didStartSpeaking(const WebKit::WebSpeechSynthesisUtterance&);
-    virtual void didFinishSpeaking(const WebKit::WebSpeechSynthesisUtterance&);
-    virtual void didPauseSpeaking(const WebKit::WebSpeechSynthesisUtterance&);
-    virtual void didResumeSpeaking(const WebKit::WebSpeechSynthesisUtterance&);
-    virtual void speakingErrorOccurred(const WebKit::WebSpeechSynthesisUtterance&);
-    virtual void wordBoundaryEventOccurred(const WebKit::WebSpeechSynthesisUtterance&, unsigned charIndex);
-    virtual void sentenceBoundaryEventOccurred(const WebKit::WebSpeechSynthesisUtterance&, unsigned charIndex);
-
-private:
-    PlatformSpeechSynthesizer* m_synthesizer;
-    PlatformSpeechSynthesizerClient* m_client;
-};
-
-} // namespace WebCore
-
-#endif // WebSpeechSynthesizerClientImpl_h
index 359a406..7094fa3 100644 (file)
@@ -29,7 +29,6 @@
 #include "PlatformSpeechSynthesisUtterance.h"
 #include "PlatformSpeechSynthesisVoice.h"
 #include <AppKit/NSSpeechSynthesizer.h>
-#include <wtf/PassRefPtr.h>
 #include <wtf/RetainPtr.h>
 
 #if ENABLE(SPEECH_SYNTHESIS)
 {
     WebCore::PlatformSpeechSynthesizer* m_synthesizerObject;
     // Hold a Ref to the utterance so that it won't disappear until the synth is done with it.
-    WebCore::PlatformSpeechSynthesisUtterance* m_utterance;
+    const WebCore::PlatformSpeechSynthesisUtterance* m_utterance;
     
     RetainPtr<NSSpeechSynthesizer> m_synthesizer;
     float m_basePitch;
 }
 
 - (WebSpeechSynthesisWrapper *)initWithSpeechSynthesizer:(WebCore::PlatformSpeechSynthesizer *)synthesizer;
-- (void)speakUtterance:(WebCore::PlatformSpeechSynthesisUtterance *)utterance;
+- (void)speakUtterance:(const WebCore::PlatformSpeechSynthesisUtterance *)utterance;
 
 @end
 
@@ -82,7 +81,7 @@
     m_basePitch = [[m_synthesizer objectForProperty:NSSpeechPitchBaseProperty error:nil] floatValue];
 }
 
-- (void)speakUtterance:(WebCore::PlatformSpeechSynthesisUtterance *)utterance
+- (void)speakUtterance:(const WebCore::PlatformSpeechSynthesisUtterance *)utterance
 {
     // When speak is called we should not have an existing speech utterance outstanding.
     ASSERT(!m_utterance);
     UNUSED_PARAM(sender);
     
     // Clear the m_utterance variable in case finish speaking kicks off a new speaking job immediately.
-    WebCore::PlatformSpeechSynthesisUtterance* utterance = m_utterance;
+    const WebCore::PlatformSpeechSynthesisUtterance* utterance = m_utterance;
     m_utterance = 0;
     
     if (finishedSpeaking)
 
 namespace WebCore {
 
-PlatformSpeechSynthesizer::PlatformSpeechSynthesizer(PlatformSpeechSynthesizerClient* client)
-    : m_speechSynthesizerClient(client)
-{
-}
-
-PlatformSpeechSynthesizer::~PlatformSpeechSynthesizer()
-{
-}
-
 void PlatformSpeechSynthesizer::initializeVoiceList()
 {
     NSString *defaultVoiceURI = [NSSpeechSynthesizer defaultVoice];
@@ -230,12 +220,12 @@ void PlatformSpeechSynthesizer::resume()
     [m_platformSpeechWrapper.get() resume];
 }
     
-void PlatformSpeechSynthesizer::speak(PassRefPtr<PlatformSpeechSynthesisUtterance> utterance)
+void PlatformSpeechSynthesizer::speak(const PlatformSpeechSynthesisUtterance& utterance)
 {
     if (!m_platformSpeechWrapper)
         m_platformSpeechWrapper.adoptNS([[WebSpeechSynthesisWrapper alloc] initWithSpeechSynthesizer:this]);
     
-    [m_platformSpeechWrapper.get() speakUtterance:utterance.get()];
+    [m_platformSpeechWrapper.get() speakUtterance:&utterance];
 }
 
 void PlatformSpeechSynthesizer::cancel()
index e94195a..1c67182 100644 (file)
@@ -33,14 +33,13 @@ namespace WebCore {
 
 PassOwnPtr<PlatformSpeechSynthesizerMock> PlatformSpeechSynthesizerMock::create(PlatformSpeechSynthesizerClient* client)
 {
-    OwnPtr<PlatformSpeechSynthesizerMock> synthesizer = adoptPtr(new PlatformSpeechSynthesizerMock(client));
-    synthesizer->initializeVoiceList();
-    return synthesizer.release();
+    return adoptPtr(new PlatformSpeechSynthesizerMock(client));
 }
     
 PlatformSpeechSynthesizerMock::PlatformSpeechSynthesizerMock(PlatformSpeechSynthesizerClient* client)
     : PlatformSpeechSynthesizer(client)
     , m_speakingFinishedTimer(this, &PlatformSpeechSynthesizerMock::speakingFinished)
+    , m_utterance(0)
 {
 }
     
@@ -51,7 +50,7 @@ PlatformSpeechSynthesizerMock::~PlatformSpeechSynthesizerMock()
 
 void PlatformSpeechSynthesizerMock::speakingFinished(Timer<PlatformSpeechSynthesizerMock>*)
 {
-    ASSERT(m_utterance.get());
+    ASSERT(m_utterance);
     client()->didFinishSpeaking(m_utterance);
     m_utterance = 0;
 }
@@ -64,10 +63,10 @@ void PlatformSpeechSynthesizerMock::initializeVoiceList()
     m_voiceList.append(PlatformSpeechSynthesisVoice::create(String("mock.voice.logan"), String("logan"), String("fr-CA"), true, true));
 }
 
-void PlatformSpeechSynthesizerMock::speak(PassRefPtr<PlatformSpeechSynthesisUtterance> utterance)
+void PlatformSpeechSynthesizerMock::speak(const PlatformSpeechSynthesisUtterance& utterance)
 {
     ASSERT(!m_utterance);
-    m_utterance = utterance;
+    m_utterance = &utterance;
     client()->didStartSpeaking(m_utterance);
     
     // Fire a fake word and then sentence boundary event.
index bb7b4ef..f13b0e2 100644 (file)
@@ -39,7 +39,7 @@ public:
     static PassOwnPtr<PlatformSpeechSynthesizerMock> create(PlatformSpeechSynthesizerClient*);
     
     virtual ~PlatformSpeechSynthesizerMock();
-    virtual void speak(PassRefPtr<PlatformSpeechSynthesisUtterance>);
+    virtual void speak(const PlatformSpeechSynthesisUtterance&);
     virtual void pause();
     virtual void resume();
     virtual void cancel();
@@ -50,7 +50,7 @@ private:
     void speakingFinished(Timer<PlatformSpeechSynthesizerMock>*);
     
     Timer<PlatformSpeechSynthesizerMock> m_speakingFinishedTimer;
-    RefPtr<PlatformSpeechSynthesisUtterance> m_utterance;
+    const PlatformSpeechSynthesisUtterance* m_utterance;
 };
     
 } // namespace WebCore
index 88278e8..6b7222f 100644 (file)
@@ -1,3 +1,13 @@
+2013-03-19  Kenneth Russell  <kbr@google.com>
+
+        Unreviewed, rolling out r146277.
+        http://trac.webkit.org/changeset/146277
+        https://bugs.webkit.org/show_bug.cgi?id=111695
+
+        Broke Chromium Android build
+
+        * features.gypi:
+
 2013-03-19  James Robinson  <jamesr@chromium.org>
 
         [chromium] Remove compositor settings that don't go through WebKit
index 74fdee1..9a2acc2 100644 (file)
       'ENABLE_SCRIPTED_SPEECH=1',
       'ENABLE_SHADOW_DOM=1',
       'ENABLE_SMOOTH_SCROLLING=1',
-      'ENABLE_SPEECH_SYNTHESIS=1',
+      'ENABLE_SPEECH_SYNTHESIS=0',
       'ENABLE_SQL_DATABASE=<(enable_sql_database)',
       'ENABLE_STYLE_SCOPED=1',
       'ENABLE_SUBPIXEL_LAYOUT=1',