| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/speech/speech_input_manager.h" | 5 #include "chrome/browser/speech/speech_input_manager.h" |
| 6 | 6 |
| 7 #include <map> | 7 #include <map> |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "app/l10n_util.h" | 10 #include "app/l10n_util.h" |
| 11 #include "base/command_line.h" | 11 #include "base/command_line.h" |
| 12 #include "base/lazy_instance.h" |
| 12 #include "base/lock.h" | 13 #include "base/lock.h" |
| 13 #include "base/ref_counted.h" | 14 #include "base/ref_counted.h" |
| 14 #include "base/lazy_instance.h" | |
| 15 #include "base/threading/thread_restrictions.h" | 15 #include "base/threading/thread_restrictions.h" |
| 16 #include "base/utf_string_conversions.h" | 16 #include "base/utf_string_conversions.h" |
| 17 #include "chrome/browser/browser_thread.h" | 17 #include "chrome/browser/browser_thread.h" |
| 18 #include "chrome/common/chrome_switches.h" | 18 #include "chrome/browser/platform_util.h" |
| 19 #include "chrome/browser/prefs/pref_service.h" | 19 #include "chrome/browser/prefs/pref_service.h" |
| 20 #include "chrome/browser/speech/speech_input_bubble_controller.h" | 20 #include "chrome/browser/speech/speech_input_bubble_controller.h" |
| 21 #include "chrome/browser/speech/speech_recognizer.h" | 21 #include "chrome/browser/speech/speech_recognizer.h" |
| 22 #include "chrome/browser/tab_contents/infobar_delegate.h" | 22 #include "chrome/browser/tab_contents/infobar_delegate.h" |
| 23 #include "chrome/browser/tab_contents/tab_util.h" | 23 #include "chrome/browser/tab_contents/tab_util.h" |
| 24 #include "chrome/common/chrome_switches.h" |
| 24 #include "chrome/common/pref_names.h" | 25 #include "chrome/common/pref_names.h" |
| 25 #include "grit/generated_resources.h" | 26 #include "grit/generated_resources.h" |
| 26 #include "media/audio/audio_manager.h" | 27 #include "media/audio/audio_manager.h" |
| 27 | 28 |
| 28 #if defined(OS_WIN) | 29 #if defined(OS_WIN) |
| 29 #include "chrome/browser/browser_process.h" | 30 #include "chrome/browser/browser_process.h" |
| 30 #include "chrome/installer/util/wmi.h" | 31 #include "chrome/installer/util/wmi.h" |
| 31 #endif | 32 #endif |
| 32 | 33 |
| 33 namespace { | 34 namespace { |
| (...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 354 // to the user, abort it since user has switched focus. Otherwise | 355 // to the user, abort it since user has switched focus. Otherwise |
| 355 // recognition has started and keep that going so user can start speaking to | 356 // recognition has started and keep that going so user can start speaking to |
| 356 // another element while this gets the results in parallel. | 357 // another element while this gets the results in parallel. |
| 357 if (recording_caller_id_ == caller_id || !requests_[caller_id].is_active) { | 358 if (recording_caller_id_ == caller_id || !requests_[caller_id].is_active) { |
| 358 CancelRecognitionAndInformDelegate(caller_id); | 359 CancelRecognitionAndInformDelegate(caller_id); |
| 359 } | 360 } |
| 360 } | 361 } |
| 361 } | 362 } |
| 362 | 363 |
| 363 } // namespace speech_input | 364 } // namespace speech_input |
| OLD | NEW |