2010-08-13 Satish Sampath <satish@chromium.org>
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 13 Aug 2010 16:49:30 +0000 (16:49 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 13 Aug 2010 16:49:30 +0000 (16:49 +0000)
commit27a9e2979628c808def79820820861a11e9761b2
treec3d157c9870f4cbd9b05bf7be477334889883d7a
parent5e845d41e08bdc30e20b4d831d1b8dd35a896c9c
2010-08-13  Satish Sampath  <satish@chromium.org>

        Reviewed by Jeremy Orlow.

        Support for multiple speech enabled elements in same page.
        https://bugs.webkit.org/show_bug.cgi?id=43922

        * page/SpeechInput.cpp: Generates request ids as necessary when each speech enabled input element gets
        created/destroyed and multiplexes the listener callbacks to the appropriate input element based on the request id.
        (WebCore::SpeechInput::SpeechInput):
        (WebCore::SpeechInput::~SpeechInput):
        (WebCore::SpeechInput::registerListener):
        (WebCore::SpeechInput::unregisterListener):
        (WebCore::SpeechInput::didCompleteRecording):
        (WebCore::SpeechInput::didCompleteRecognition):
        (WebCore::SpeechInput::setRecognitionResult):
        (WebCore::SpeechInput::startRecognition):
        (WebCore::SpeechInput::stopRecording):
        (WebCore::SpeechInput::cancelRecognition):
        * page/SpeechInput.h:
        * page/SpeechInputClient.h: Now requires a one time set for the WebCore::SpeechInputListener and
        takes in a 'requestId' for all calls.
        * page/SpeechInputListener.h: Now returns the above mentioned requestId in all the listener callbacks for
        identifying which input element the event goes to.
        * platform/mock/SpeechInputClientMock.cpp:
        (WebCore::SpeechInputClientMock::SpeechInputClientMock):
        (WebCore::SpeechInputClientMock::setListener):
        (WebCore::SpeechInputClientMock::startRecognition):
        (WebCore::SpeechInputClientMock::stopRecording):
        (WebCore::SpeechInputClientMock::cancelRecognition):
        (WebCore::SpeechInputClientMock::timerFired):
        * platform/mock/SpeechInputClientMock.h:
        * rendering/TextControlInnerElements.cpp:
        (WebCore::InputFieldSpeechButtonElement::InputFieldSpeechButtonElement):
        (WebCore::InputFieldSpeechButtonElement::~InputFieldSpeechButtonElement):
        (WebCore::InputFieldSpeechButtonElement::defaultEventHandler):
        (WebCore::InputFieldSpeechButtonElement::speechInput):
        (WebCore::InputFieldSpeechButtonElement::didCompleteRecording):
        (WebCore::InputFieldSpeechButtonElement::didCompleteRecognition):
        (WebCore::InputFieldSpeechButtonElement::setRecognitionResult):
        * rendering/TextControlInnerElements.h:
2010-08-13  Satish Sampath  <satish@chromium.org>

        Reviewed by Jeremy Orlow.

        Support for multiple speech enabled elements in same page.
        https://bugs.webkit.org/show_bug.cgi?id=43922

        * public/WebSpeechInputController.h: Bubbles up the requestId given by webcore to the embedder.
        (WebKit::WebSpeechInputController::startRecognition):
        (WebKit::WebSpeechInputController::cancelRecognition):
        (WebKit::WebSpeechInputController::stopRecording):
        * public/WebSpeechInputListener.h: Passes down the requestId given by embedder to webcore.
        (WebKit::WebSpeechInputListener::didCompleteRecording):
        (WebKit::WebSpeechInputListener::setRecognitionResult):
        (WebKit::WebSpeechInputListener::didCompleteRecognition):
        * src/SpeechInputClientImpl.cpp:
        (WebKit::SpeechInputClientImpl::setListener):
        (WebKit::SpeechInputClientImpl::startRecognition):
        (WebKit::SpeechInputClientImpl::stopRecording):
        (WebKit::SpeechInputClientImpl::cancelRecognition):
        (WebKit::SpeechInputClientImpl::didCompleteRecording):
        (WebKit::SpeechInputClientImpl::didCompleteRecognition):
        (WebKit::SpeechInputClientImpl::setRecognitionResult):
        * src/SpeechInputClientImpl.h:
        * src/WebSpeechInputControllerMockImpl.cpp:
        (WebKit::WebSpeechInputControllerMockImpl::WebSpeechInputControllerMockImpl):
        (WebKit::WebSpeechInputControllerMockImpl::~WebSpeechInputControllerMockImpl):
        (WebKit::WebSpeechInputControllerMockImpl::didCompleteRecording):
        (WebKit::WebSpeechInputControllerMockImpl::didCompleteRecognition):
        (WebKit::WebSpeechInputControllerMockImpl::setRecognitionResult):
        (WebKit::WebSpeechInputControllerMockImpl::startRecognition):
        (WebKit::WebSpeechInputControllerMockImpl::cancelRecognition):
        (WebKit::WebSpeechInputControllerMockImpl::stopRecording):
        * src/WebSpeechInputControllerMockImpl.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@65327 268f45cc-cd09-0410-ab3c-d52691b4dbfc
16 files changed:
WebCore/ChangeLog
WebCore/page/SpeechInput.cpp
WebCore/page/SpeechInput.h
WebCore/page/SpeechInputClient.h
WebCore/page/SpeechInputListener.h
WebCore/platform/mock/SpeechInputClientMock.cpp
WebCore/platform/mock/SpeechInputClientMock.h
WebCore/rendering/TextControlInnerElements.cpp
WebCore/rendering/TextControlInnerElements.h
WebKit/chromium/ChangeLog
WebKit/chromium/public/WebSpeechInputController.h
WebKit/chromium/public/WebSpeechInputListener.h
WebKit/chromium/src/SpeechInputClientImpl.cpp
WebKit/chromium/src/SpeechInputClientImpl.h
WebKit/chromium/src/WebSpeechInputControllerMockImpl.cpp
WebKit/chromium/src/WebSpeechInputControllerMockImpl.h