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

Unified Diff: ui/keyboard/keyboard_util.cc

Issue 1319523003: add audio (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 4 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 | « ui/keyboard/keyboard.gyp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/keyboard/keyboard_util.cc
diff --git a/ui/keyboard/keyboard_util.cc b/ui/keyboard/keyboard_util.cc
index 012c0d99e877382e7726aca419be9421df2fa13c..db43a94e0f93a34ecfb22fc724d44e835df4f894 100644
--- a/ui/keyboard/keyboard_util.cc
+++ b/ui/keyboard/keyboard_util.cc
@@ -14,6 +14,8 @@
#include "base/strings/string16.h"
#include "grit/keyboard_resources.h"
#include "grit/keyboard_resources_map.h"
+#include "media/audio/audio_manager.h"
+#include "ui/aura/client/aura_constants.h"
#include "ui/aura/window_tree_host.h"
#include "ui/base/ime/input_method.h"
#include "ui/base/ime/text_input_client.h"
@@ -184,7 +186,8 @@ bool IsSmartDeployEnabled() {
}
bool IsVoiceInputEnabled() {
- return !base::CommandLine::ForCurrentProcess()->HasSwitch(
+ return media::AudioManager::Get()->HasAudioInputDevices() &&
+ !base::CommandLine::ForCurrentProcess()->HasSwitch(
switches::kDisableVoiceInput);
}
« no previous file with comments | « ui/keyboard/keyboard.gyp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698