| Index: chrome/renderer/render_thread.cc
|
| diff --git a/chrome/renderer/render_thread.cc b/chrome/renderer/render_thread.cc
|
| index 2d9c465da104b89575e0614a9a251436666abc99..92110a56f4e994d5de7d217ec38363e94b0a1c73 100644
|
| --- a/chrome/renderer/render_thread.cc
|
| +++ b/chrome/renderer/render_thread.cc
|
| @@ -265,6 +265,7 @@ void RenderThread::Init() {
|
| is_extension_process_ = type_str == switches::kExtensionProcess ||
|
| CommandLine::ForCurrentProcess()->HasSwitch(switches::kSingleProcess);
|
| is_incognito_process_ = false;
|
| + is_speech_input_enabled_ = false;
|
| suspend_webkit_shared_timer_ = true;
|
| notify_webkit_of_modal_loop_ = true;
|
| plugin_refresh_allowed_ = true;
|
| @@ -638,11 +639,18 @@ bool RenderThread::OnControlMessageReceived(const IPC::Message& msg) {
|
| OnSpellCheckEnableAutoSpellCorrect)
|
| IPC_MESSAGE_HANDLER(ViewMsg_GpuChannelEstablished, OnGpuChannelEstablished)
|
| IPC_MESSAGE_HANDLER(ViewMsg_SetPhishingModel, OnSetPhishingModel)
|
| + IPC_MESSAGE_HANDLER(ViewMsg_SpeechInput_SetFeatureEnabled,
|
| + OnSetSpeechInputEnabled)
|
| IPC_MESSAGE_UNHANDLED(handled = false)
|
| IPC_END_MESSAGE_MAP()
|
| return handled;
|
| }
|
|
|
| +void RenderThread::OnSetSpeechInputEnabled(bool enabled) {
|
| + DCHECK(!webkit_client_.get());
|
| + is_speech_input_enabled_ = enabled;
|
| +}
|
| +
|
| void RenderThread::OnSetNextPageID(int32 next_page_id) {
|
| // This should only be called at process initialization time, so we shouldn't
|
| // have to worry about thread-safety.
|
| @@ -944,8 +952,7 @@ void RenderThread::EnsureWebKitInitialized() {
|
| WebRuntimeFeatures::enableDeviceOrientation(
|
| !command_line.HasSwitch(switches::kDisableDeviceOrientation));
|
|
|
| - WebRuntimeFeatures::enableSpeechInput(
|
| - !command_line.HasSwitch(switches::kDisableSpeechInput));
|
| + WebRuntimeFeatures::enableSpeechInput(is_speech_input_enabled_);
|
|
|
| WebRuntimeFeatures::enableFileSystem(
|
| !command_line.HasSwitch(switches::kDisableFileSystem));
|
|
|