summaryrefslogtreecommitdiffstats
path: root/chrome/renderer
diff options
context:
space:
mode:
authorsatish@chromium.org <satish@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-28 08:29:40 +0000
committersatish@chromium.org <satish@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-28 08:29:40 +0000
commit0478d01629f03e3040cb2aee03c1fc6ace51bb8b (patch)
tree372f84dd3df628dbf849c7659920829de0d82d63 /chrome/renderer
parentc0b5909a5e619cb174b5f601e49472939693dbc1 (diff)
downloadchromium_src-0478d01629f03e3040cb2aee03c1fc6ace51bb8b.zip
chromium_src-0478d01629f03e3040cb2aee03c1fc6ace51bb8b.tar.gz
chromium_src-0478d01629f03e3040cb2aee03c1fc6ace51bb8b.tar.bz2
Enable speech input by default on windows.
Makes --enable-speech-input with available only on non-windows builds and adds --disable-speech-input for windows. BUG=none TEST=browser_tests --gtest_filter="SpeechInputBrowserTest.*" Review URL: http://codereview.chromium.org/3261001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@57781 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer')
-rw-r--r--chrome/renderer/render_thread.cc11
1 files changed, 9 insertions, 2 deletions
diff --git a/chrome/renderer/render_thread.cc b/chrome/renderer/render_thread.cc
index d45a925..4ad6a3f 100644
--- a/chrome/renderer/render_thread.cc
+++ b/chrome/renderer/render_thread.cc
@@ -205,6 +205,14 @@ class RenderViewZoomer : public RenderViewVisitor {
DISALLOW_COPY_AND_ASSIGN(RenderViewZoomer);
};
+
+bool IsSpeechInputEnabled(const CommandLine& command_line) {
+#if defined(OS_WIN) || defined(OS_MACOSX)
+ return !command_line.HasSwitch(switches::kDisableSpeechInput);
+#else
+ return command_line.HasSwitch(switches::kEnableSpeechInput);
+#endif
+}
} // namespace
// When we run plugins in process, we actually run them on the render thread,
@@ -933,8 +941,7 @@ void RenderThread::EnsureWebKitInitialized() {
WebRuntimeFeatures::enableDeviceOrientation(
!command_line.HasSwitch(switches::kDisableDeviceOrientation));
- WebRuntimeFeatures::enableSpeechInput(
- command_line.HasSwitch(switches::kEnableSpeechInput));
+ WebRuntimeFeatures::enableSpeechInput(IsSpeechInputEnabled(command_line));
}
void RenderThread::IdleHandler() {