Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(628)

Unified Diff: chrome/renderer/render_thread.cc

Issue 6353005: Revert r70896 to move speech input back behind a flag. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/renderer/render_thread.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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));
« no previous file with comments | « chrome/renderer/render_thread.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698