Changeset 63230 in webkit


Ignore:
Timestamp:
Jul 13, 2010 12:16:32 PM (14 years ago)
Author:
commit-queue@webkit.org
Message:

2010-07-13 Satish Sampath <satish@chromium.org>

Reviewed by Steve Block.

Speech input plumbing in webcore
https://bugs.webkit.org/show_bug.cgi?id=41518

Adds the following:

  • a SpeechInput class to be used by the speech enabled HTML elements
  • a SpeechInputListener interface to be implemented by the speech enabled HTML elements
  • a SpeechInputClient interface (defined in WebCore, implemented by WebKit) for WebCore to call into WebKit. This is available as a member of WebCore::Page, set by the platforms which support speech input.
  • a SpeechInputClientListener interface for WebCore to receive events from WebKit

No new tests, the relevant LayoutTestController bindings will be added in a subsequent patch.

  • Android.mk:
  • GNUmakefile.am:
  • WebCore.gypi:
  • WebCore.pro:
  • WebCore.vcproj/WebCore.vcproj:
  • WebCore.xcodeproj/project.pbxproj:
  • page/Page.cpp: (WebCore::Page::Page):
  • page/Page.h: Added SpeechInputClient member variable and associated methods. (WebCore::Page::setSpeechInputClient): (WebCore::Page::speechInputClient):
  • page/SpeechInput.cpp: Added new class to provide speech API services to HTML elements. (WebCore::SpeechInput::SpeechInput): (WebCore::SpeechInput::recordingComplete): (WebCore::SpeechInput::setRecognitionResult): (WebCore::SpeechInput::startRecognition):
  • page/SpeechInput.h: Added. (WebCore::SpeechInput::~SpeechInput): (WebCore::SpeechInput::client):
  • page/SpeechInputListener.h: Added. (WebCore::SpeechInputListener::~SpeechInputListener):
  • page/SpeechInputClient.h: Added new interface implemented by WebKit to bubble up speech API requests to the embedder. (WebCore::SpeechInputClient::~SpeechInputClient):
  • page/SpeechInputClientListener.h: Added. (WebCore::SpeechInputClientListener::~SpeechInputClientListener):
Location:
trunk/WebCore
Files:
5 added
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/Android.mk

    r63193 r63230  
    382382        page/Settings.cpp \
    383383        page/SpatialNavigation.cpp \
     384        page/SpeechInput.cpp \
    384385        page/SuspendableTimer.cpp \
    385386        page/Timing.cpp \
  • trunk/WebCore/ChangeLog

    r63229 r63230  
     12010-07-13  Satish Sampath  <satish@chromium.org>
     2
     3        Reviewed by Steve Block.
     4
     5        Speech input plumbing in webcore
     6        https://bugs.webkit.org/show_bug.cgi?id=41518
     7
     8        Adds the following:
     9        - a SpeechInput class to be used by the speech enabled HTML elements
     10        - a SpeechInputListener interface to be implemented by the speech enabled HTML elements
     11        - a SpeechInputClient interface (defined in WebCore, implemented by WebKit) for WebCore to call into WebKit.
     12          This is available as a member of WebCore::Page, set by the platforms which support speech input.
     13        - a SpeechInputClientListener interface for WebCore to receive events from WebKit
     14
     15        No new tests, the relevant LayoutTestController bindings will be added in a subsequent patch.
     16
     17        * Android.mk:
     18        * GNUmakefile.am:
     19        * WebCore.gypi:
     20        * WebCore.pro:
     21        * WebCore.vcproj/WebCore.vcproj:
     22        * WebCore.xcodeproj/project.pbxproj:
     23        * page/Page.cpp:
     24        (WebCore::Page::Page):
     25        * page/Page.h: Added SpeechInputClient member variable and associated methods.
     26        (WebCore::Page::setSpeechInputClient):
     27        (WebCore::Page::speechInputClient):
     28        * page/SpeechInput.cpp: Added new class to provide speech API services to HTML elements.
     29        (WebCore::SpeechInput::SpeechInput):
     30        (WebCore::SpeechInput::recordingComplete):
     31        (WebCore::SpeechInput::setRecognitionResult):
     32        (WebCore::SpeechInput::startRecognition):
     33        * page/SpeechInput.h: Added.
     34        (WebCore::SpeechInput::~SpeechInput):
     35        (WebCore::SpeechInput::client):
     36        * page/SpeechInputListener.h: Added.
     37        (WebCore::SpeechInputListener::~SpeechInputListener):
     38        * page/SpeechInputClient.h: Added new interface implemented by WebKit to bubble up speech API requests to the embedder.
     39        (WebCore::SpeechInputClient::~SpeechInputClient):
     40        * page/SpeechInputClientListener.h: Added.
     41        (WebCore::SpeechInputClientListener::~SpeechInputClientListener):
     42
    1432010-07-13  Richard Moore <rich@kde.org>, Robert Hogan  <robert@webkit.org>
    244
  • trunk/WebCore/GNUmakefile.am

    r63198 r63230  
    26932693webcore_cppflags += -DENABLE_INPUT_SPEECH=1
    26942694
     2695webcore_sources += \
     2696        WebCore/page/SpeechInput.cpp \
     2697        WebCore/page/SpeechInput.h \
     2698        WebCore/page/SpeechInputClient.h \
     2699        WebCore/page/SpeechInputClientListener.h \
     2700        WebCore/page/SpeechInputListener.h
     2701
    26952702else
    26962703
  • trunk/WebCore/WebCore.gypi

    r63198 r63230  
    20382038            'page/SpatialNavigation.h',
    20392039            'page/SpatialNavigation.cpp',
     2040            'page/SpeechInput.cpp',
     2041            'page/SpeechInput.h',
     2042            'page/SpeechInputClient.h',
     2043            'page/SpeechInputClientListener.h',
     2044            'page/SpeechInputListener.h',
    20402045            'page/SuspendableTimer.cpp',
    20412046            'page/SuspendableTimer.h',
  • trunk/WebCore/WebCore.pro

    r63206 r63230  
    15981598    page/Settings.h \
    15991599    page/SpatialNavigation.h \
     1600    page/SpeechInput.h \
     1601    page/SpeechInputClient.h \
     1602    page/SpeechInputClientListener.h \
     1603    page/SpeechInputListener.h \
    16001604    page/WindowFeatures.h \
    16011605    page/WorkerNavigator.h \
     
    25272531contains(DEFINES, ENABLE_INPUT_SPEECH=1) {
    25282532    SOURCES += \
     2533        page/SpeechInput.cpp \
    25292534        rendering/RenderInputSpeech.cpp
    25302535}
  • trunk/WebCore/WebCore.vcproj/WebCore.vcproj

    r63198 r63230  
    2248222482                        </File>
    2248322483                        <File
     22484                                RelativePath="..\page\SpeechInput.cpp"
     22485                                >
     22486                        </File>
     22487                        <File
     22488                                RelativePath="..\page\SpeechInput.h"
     22489                                >
     22490                        </File>
     22491                        <File
     22492                                RelativePath="..\page\SpeechInputClient.h"
     22493                                >
     22494                        </File>
     22495                        <File
     22496                                RelativePath="..\page\SpeechInputClientListener.h"
     22497                                >
     22498                        </File>
     22499                        <File
     22500                                RelativePath="..\page\SpeechInputListener.h"
     22501                                >
     22502                        </File>
     22503                        <File
    2248422504                                RelativePath="..\page\SuspendableTimer.cpp"
    2248522505                                >
  • trunk/WebCore/WebCore.xcodeproj/project.pbxproj

    r63198 r63230  
    13461346                7553CFE8108F473F00EA281E /* TimelineRecordFactory.h in Headers */ = {isa = PBXBuildFile; fileRef = 7553CFE6108F473F00EA281E /* TimelineRecordFactory.h */; };
    13471347                7553CFE9108F473F00EA281E /* TimelineRecordFactory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7553CFE7108F473F00EA281E /* TimelineRecordFactory.cpp */; };
     1348                7578F90B11DDF26900D933C5 /* SpeechInput.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7578F90811DDF26900D933C5 /* SpeechInput.cpp */; };
     1349                7578F90C11DDF26900D933C5 /* SpeechInput.h in Headers */ = {isa = PBXBuildFile; fileRef = 7578F90911DDF26900D933C5 /* SpeechInput.h */; };
     1350                7578F90D11DDF26900D933C5 /* SpeechInputClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 7578F90A11DDF26900D933C5 /* SpeechInputClient.h */; };
     1351                7578F91F11E4E32800D933C5 /* SpeechInputClientListener.h in Headers */ = {isa = PBXBuildFile; fileRef = 7578F91D11E4E32800D933C5 /* SpeechInputClientListener.h */; };
     1352                7578F92011E4E32800D933C5 /* SpeechInputListener.h in Headers */ = {isa = PBXBuildFile; fileRef = 7578F91E11E4E32800D933C5 /* SpeechInputListener.h */; };
    13481353                75793E830D0CE0B3007FC0AC /* MessageEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 75793E800D0CE0B3007FC0AC /* MessageEvent.cpp */; };
    13491354                75793E840D0CE0B3007FC0AC /* MessageEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 75793E810D0CE0B3007FC0AC /* MessageEvent.h */; };
     
    70967101                7553CFE6108F473F00EA281E /* TimelineRecordFactory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TimelineRecordFactory.h; sourceTree = "<group>"; };
    70977102                7553CFE7108F473F00EA281E /* TimelineRecordFactory.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TimelineRecordFactory.cpp; sourceTree = "<group>"; };
     7103                7578F90811DDF26900D933C5 /* SpeechInput.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SpeechInput.cpp; sourceTree = "<group>"; };
     7104                7578F90911DDF26900D933C5 /* SpeechInput.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SpeechInput.h; sourceTree = "<group>"; };
     7105                7578F90A11DDF26900D933C5 /* SpeechInputClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SpeechInputClient.h; sourceTree = "<group>"; };
     7106                7578F91D11E4E32800D933C5 /* SpeechInputClientListener.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SpeechInputClientListener.h; sourceTree = "<group>"; };
     7107                7578F91E11E4E32800D933C5 /* SpeechInputListener.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SpeechInputListener.h; sourceTree = "<group>"; };
    70987108                75793E800D0CE0B3007FC0AC /* MessageEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = MessageEvent.cpp; path = dom/MessageEvent.cpp; sourceTree = SOURCE_ROOT; };
    70997109                75793E810D0CE0B3007FC0AC /* MessageEvent.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = MessageEvent.h; path = dom/MessageEvent.h; sourceTree = SOURCE_ROOT; };
     
    1233812348                                626CDE0C1140424C001E5A68 /* SpatialNavigation.cpp */,
    1233912349                                626CDE0D1140424C001E5A68 /* SpatialNavigation.h */,
     12350                                7578F90811DDF26900D933C5 /* SpeechInput.cpp */,
     12351                                7578F90911DDF26900D933C5 /* SpeechInput.h */,
     12352                                7578F90A11DDF26900D933C5 /* SpeechInputClient.h */,
     12353                                7578F91D11E4E32800D933C5 /* SpeechInputClientListener.h */,
     12354                                7578F91E11E4E32800D933C5 /* SpeechInputListener.h */,
    1234012355                                62C1217A11AB9E76003C462C /* SuspendableTimer.cpp */,
    1234112356                                62C1217B11AB9E77003C462C /* SuspendableTimer.h */,
     
    1977919794                                C585A6FE11D4FB3D004C3E4B /* IndexedDatabaseRequest.h in Headers */,
    1978019795                                590E1B4911E4EF4B0069F784 /* DeviceOrientation.h in Headers */,
     19796                                7578F90C11DDF26900D933C5 /* SpeechInput.h in Headers */,
     19797                                7578F90D11DDF26900D933C5 /* SpeechInputClient.h in Headers */,
     19798                                7578F91F11E4E32800D933C5 /* SpeechInputClientListener.h in Headers */,
     19799                                7578F92011E4E32800D933C5 /* SpeechInputListener.h in Headers */,
    1978119800                        );
    1978219801                        runOnlyForDeploymentPostprocessing = 0;
     
    2216622185                                590E1B4B11E4EF700069F784 /* JSDeviceOrientationEventCustom.cpp in Sources */,
    2216722186                                59D1C10411EB5DCF00B638C8 /* DeviceOrientation.cpp in Sources */,
     22187                                7578F90B11DDF26900D933C5 /* SpeechInput.cpp in Sources */,
    2216822188                        );
    2216922189                        runOnlyForDeploymentPostprocessing = 0;
  • trunk/WebCore/page/Page.cpp

    r62676 r63230  
    6262#include "Settings.h"
    6363#include "SharedBuffer.h"
     64#include "SpeechInputClient.h"
    6465#include "StringHash.h"
    6566#include "TextResourceDecoder.h"
     
    140141#if ENABLE(DEVICE_ORIENTATION)
    141142    , m_deviceOrientationController(new DeviceOrientationController(this, deviceOrientationClient))
     143#endif
     144#if ENABLE(INPUT_SPEECH)
     145    , m_speechInputClient(0)
    142146#endif
    143147    , m_settings(new Settings(this))
  • trunk/WebCore/page/Page.h

    r62676 r63230  
    7171    class SelectionController;
    7272    class Settings;
     73    class SpeechInputClient;
    7374
    7475#if ENABLE(DOM_STORAGE)
     
    153154        DeviceOrientationController* deviceOrientationController() const { return m_deviceOrientationController.get(); }
    154155#endif
     156#if ENABLE(INPUT_SPEECH)
     157        void setSpeechInputClient(SpeechInputClient* client) { m_speechInputClient = client; }
     158        SpeechInputClient* speechInputClient() const { return m_speechInputClient; }
     159#endif
    155160        Settings* settings() const { return m_settings.get(); }
    156161        ProgressTracker* progress() const { return m_progress.get(); }
     
    270275        OwnPtr<DeviceOrientationController> m_deviceOrientationController;
    271276#endif
     277#if ENABLE(INPUT_SPEECH)
     278        SpeechInputClient* m_speechInputClient;
     279#endif
    272280        OwnPtr<Settings> m_settings;
    273281        OwnPtr<ProgressTracker> m_progress;
Note: See TracChangeset for help on using the changeset viewer.