OLD | NEW |
1 // Copyright (c) 2011 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 "content/browser/speech/speech_input_manager.h" | 5 #include "content/browser/speech/speech_input_manager.h" |
6 | 6 |
7 #include <map> | 7 #include <map> |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/lazy_instance.h" | 10 #include "base/lazy_instance.h" |
11 #include "base/memory/ref_counted.h" | 11 #include "base/memory/ref_counted.h" |
12 #include "base/synchronization/lock.h" | 12 #include "base/synchronization/lock.h" |
13 #include "base/threading/thread_restrictions.h" | 13 #include "base/threading/thread_restrictions.h" |
14 #include "base/utf_string_conversions.h" | 14 #include "base/utf_string_conversions.h" |
15 #include "chrome/browser/browser_process.h" | 15 #include "chrome/browser/browser_process.h" |
16 #include "chrome/browser/platform_util.h" | |
17 #include "chrome/browser/prefs/pref_service.h" | 16 #include "chrome/browser/prefs/pref_service.h" |
18 #include "chrome/browser/speech/speech_input_bubble_controller.h" | 17 #include "chrome/browser/speech/speech_input_bubble_controller.h" |
19 #include "chrome/browser/tab_contents/tab_util.h" | 18 #include "chrome/browser/tab_contents/tab_util.h" |
20 #include "chrome/common/chrome_switches.h" | 19 #include "chrome/common/chrome_switches.h" |
21 #include "chrome/common/pref_names.h" | 20 #include "chrome/common/pref_names.h" |
22 #include "content/browser/browser_thread.h" | 21 #include "content/browser/browser_thread.h" |
23 #include "content/browser/speech/speech_recognizer.h" | 22 #include "content/browser/speech/speech_recognizer.h" |
24 #include "grit/generated_resources.h" | 23 #include "grit/generated_resources.h" |
25 #include "media/audio/audio_manager.h" | 24 #include "media/audio/audio_manager.h" |
26 #include "ui/base/l10n/l10n_util.h" | 25 #include "ui/base/l10n/l10n_util.h" |
(...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
388 // to the user, abort it since user has switched focus. Otherwise | 387 // to the user, abort it since user has switched focus. Otherwise |
389 // recognition has started and keep that going so user can start speaking to | 388 // recognition has started and keep that going so user can start speaking to |
390 // another element while this gets the results in parallel. | 389 // another element while this gets the results in parallel. |
391 if (recording_caller_id_ == caller_id || !requests_[caller_id].is_active) { | 390 if (recording_caller_id_ == caller_id || !requests_[caller_id].is_active) { |
392 CancelRecognitionAndInformDelegate(caller_id); | 391 CancelRecognitionAndInformDelegate(caller_id); |
393 } | 392 } |
394 } | 393 } |
395 } | 394 } |
396 | 395 |
397 } // namespace speech_input | 396 } // namespace speech_input |
OLD | NEW |