OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/lazy_instance.h" |
13 #include "base/ref_counted.h" | 13 #include "base/ref_counted.h" |
14 #include "base/synchronization/lock.h" | 14 #include "base/synchronization/lock.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_process.h" | 17 #include "chrome/browser/browser_process.h" |
18 #include "chrome/browser/browser_thread.h" | 18 #include "chrome/browser/browser_thread.h" |
19 #include "chrome/browser/platform_util.h" | 19 #include "chrome/browser/platform_util.h" |
20 #include "chrome/browser/prefs/pref_service.h" | 20 #include "chrome/browser/prefs/pref_service.h" |
21 #include "chrome/browser/speech/speech_input_bubble_controller.h" | 21 #include "chrome/browser/speech/speech_input_bubble_controller.h" |
22 #include "chrome/browser/speech/speech_recognizer.h" | 22 #include "chrome/browser/speech/speech_recognizer.h" |
23 #include "chrome/browser/tab_contents/infobar_delegate.h" | |
24 #include "chrome/browser/tab_contents/tab_util.h" | 23 #include "chrome/browser/tab_contents/tab_util.h" |
25 #include "chrome/common/chrome_switches.h" | 24 #include "chrome/common/chrome_switches.h" |
26 #include "chrome/common/pref_names.h" | 25 #include "chrome/common/pref_names.h" |
27 #include "grit/generated_resources.h" | 26 #include "grit/generated_resources.h" |
28 #include "media/audio/audio_manager.h" | 27 #include "media/audio/audio_manager.h" |
29 | 28 |
30 #if defined(OS_WIN) | 29 #if defined(OS_WIN) |
31 #include "chrome/installer/util/wmi.h" | 30 #include "chrome/installer/util/wmi.h" |
32 #endif | 31 #endif |
33 | 32 |
(...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
381 // to the user, abort it since user has switched focus. Otherwise | 380 // to the user, abort it since user has switched focus. Otherwise |
382 // recognition has started and keep that going so user can start speaking to | 381 // recognition has started and keep that going so user can start speaking to |
383 // another element while this gets the results in parallel. | 382 // another element while this gets the results in parallel. |
384 if (recording_caller_id_ == caller_id || !requests_[caller_id].is_active) { | 383 if (recording_caller_id_ == caller_id || !requests_[caller_id].is_active) { |
385 CancelRecognitionAndInformDelegate(caller_id); | 384 CancelRecognitionAndInformDelegate(caller_id); |
386 } | 385 } |
387 } | 386 } |
388 } | 387 } |
389 | 388 |
390 } // namespace speech_input | 389 } // namespace speech_input |
OLD | NEW |