Changeset 64269 in webkit


Ignore:
Timestamp:
Jul 29, 2010 4:27:54 AM (14 years ago)
Author:
commit-queue@webkit.org
Message:

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

Reviewed by Steve Block.

Runtime feature switch for speech input.
https://bugs.webkit.org/show_bug.cgi?id=43146

Add a runtime feature switch that decides whether speech input attributes are available or not.
Defaults to true.

  • bindings/generic/RuntimeEnabledFeatures.cpp:
  • bindings/generic/RuntimeEnabledFeatures.h: (WebCore::RuntimeEnabledFeatures::setSpeechInputEnabled): (WebCore::RuntimeEnabledFeatures::speechInputEnabled): (WebCore::RuntimeEnabledFeatures::speechEnabled):
  • html/HTMLInputElement.idl:

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

Reviewed by Steve Block.

Runtime feature switch for speech input
https://bugs.webkit.org/show_bug.cgi?id=43146

Add a runtime feature switch that decides whether speech input attributes are available or not.
Defaults to true.

  • public/WebRuntimeFeatures.h:
  • src/SpeechInputClientImpl.cpp: (WebKit::SpeechInputClientImpl::SpeechInputClientImpl):
  • src/WebRuntimeFeatures.cpp: (WebKit::WebRuntimeFeatures::enableSpeechInput): (WebKit::WebRuntimeFeatures::isSpeechInputEnabled):
Location:
trunk
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r64267 r64269  
     12010-07-29  Satish Sampath  <satish@chromium.org>
     2
     3        Reviewed by Steve Block.
     4
     5        Runtime feature switch for speech input.
     6        https://bugs.webkit.org/show_bug.cgi?id=43146
     7
     8        Add a runtime feature switch that decides whether speech input attributes are available or not.
     9        Defaults to true.
     10
     11        * bindings/generic/RuntimeEnabledFeatures.cpp:
     12        * bindings/generic/RuntimeEnabledFeatures.h:
     13        (WebCore::RuntimeEnabledFeatures::setSpeechInputEnabled):
     14        (WebCore::RuntimeEnabledFeatures::speechInputEnabled):
     15        (WebCore::RuntimeEnabledFeatures::speechEnabled):
     16        * html/HTMLInputElement.idl:
     17
    1182010-07-27  Alexander Pavlov  <apavlov@chromium.org>
    219
  • trunk/WebCore/bindings/generic/RuntimeEnabledFeatures.cpp

    r63810 r64269  
    4949bool RuntimeEnabledFeatures::isTouchEnabled = true;
    5050bool RuntimeEnabledFeatures::isDeviceOrientationEnabled = true;
     51bool RuntimeEnabledFeatures::isSpeechInputEnabled = true;
    5152
    5253#if ENABLE(VIDEO)
  • trunk/WebCore/bindings/generic/RuntimeEnabledFeatures.h

    r64201 r64269  
    120120    static bool ondeviceorientationEnabled() { return isDeviceOrientationEnabled; }
    121121
     122    static void setSpeechInputEnabled(bool isEnabled) { isSpeechInputEnabled = isEnabled; }
     123    static bool speechInputEnabled() { return isSpeechInputEnabled; }
     124    static bool speechEnabled() { return isSpeechInputEnabled; }
     125
    122126private:
    123127    // Never instantiate.
     
    134138    static bool isTouchEnabled;
    135139    static bool isDeviceOrientationEnabled;
     140    static bool isSpeechInputEnabled;
    136141};
    137142
  • trunk/WebCore/html/HTMLInputElement.idl

    r63594 r64269  
    101101
    102102#if defined(ENABLE_INPUT_SPEECH) && ENABLE_INPUT_SPEECH
    103         attribute [Reflect] boolean speech;
     103        attribute [Reflect, EnabledAtRuntime] boolean speech;
    104104#endif
    105105    };
  • trunk/WebKit/chromium/ChangeLog

    r64265 r64269  
     12010-07-29  Satish Sampath  <satish@chromium.org>
     2
     3        Reviewed by Steve Block.
     4
     5        Runtime feature switch for speech input
     6        https://bugs.webkit.org/show_bug.cgi?id=43146
     7
     8        Add a runtime feature switch that decides whether speech input attributes are available or not.
     9        Defaults to true.
     10
     11        * public/WebRuntimeFeatures.h:
     12        * src/SpeechInputClientImpl.cpp:
     13        (WebKit::SpeechInputClientImpl::SpeechInputClientImpl):
     14        * src/WebRuntimeFeatures.cpp:
     15        (WebKit::WebRuntimeFeatures::enableSpeechInput):
     16        (WebKit::WebRuntimeFeatures::isSpeechInputEnabled):
     17
    1182010-07-28  Kavita Kanetkar  <kkanetkar@chromium.org>
    219
  • trunk/WebKit/chromium/public/WebRuntimeFeatures.h

    r63810 r64269  
    8181    WEBKIT_API static bool isDeviceOrientationEnabled();
    8282
     83    WEBKIT_API static void enableSpeechInput(bool);
     84    WEBKIT_API static bool isSpeechInputEnabled();
     85
    8386private:
    8487    WebRuntimeFeatures();
  • trunk/WebKit/chromium/src/SpeechInputClientImpl.cpp

    r64111 r64269  
    4646    , m_listener(0)
    4747{
    48     ASSERT(m_controller);
     48    // FIXME: Right now WebViewClient gives a null pointer, and with the
     49    // runtime flag for speech input feature set to true by default this will
     50    // always assert. Enable this assert once the WebViewClient starts to
     51    // give a valid pointer.
     52    // ASSERT(m_controller);
    4953}
    5054
  • trunk/WebKit/chromium/src/WebRuntimeFeatures.cpp

    r63810 r64269  
    237237}
    238238
     239void WebRuntimeFeatures::enableSpeechInput(bool enable)
     240{
     241    RuntimeEnabledFeatures::setSpeechInputEnabled(enable);
     242}
     243
     244bool WebRuntimeFeatures::isSpeechInputEnabled()
     245{
     246    return RuntimeEnabledFeatures::speechInputEnabled();
     247}
     248
    239249} // namespace WebKit
Note: See TracChangeset for help on using the changeset viewer.