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 "chrome/browser/speech/chrome_speech_input_manager.h" | 5 #include "chrome/browser/speech/chrome_speech_input_manager.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/synchronization/lock.h" | 10 #include "base/synchronization/lock.h" |
11 #include "base/threading/thread_restrictions.h" | 11 #include "base/threading/thread_restrictions.h" |
12 #include "base/utf_string_conversions.h" | 12 #include "base/utf_string_conversions.h" |
13 #include "chrome/browser/browser_process.h" | 13 #include "chrome/browser/browser_process.h" |
14 #include "chrome/browser/prefs/pref_service.h" | 14 #include "chrome/browser/prefs/pref_service.h" |
15 #include "chrome/browser/tab_contents/tab_util.h" | 15 #include "chrome/browser/tab_contents/tab_util.h" |
16 #include "chrome/common/pref_names.h" | 16 #include "chrome/common/pref_names.h" |
17 #include "content/public/browser/browser_thread.h" | 17 #include "content/public/browser/browser_thread.h" |
18 #include "grit/generated_resources.h" | 18 #include "grit/generated_resources.h" |
19 #include "media/audio/audio_manager.h" | 19 #include "media/audio/audio_manager.h" |
20 #include "ui/base/l10n/l10n_util.h" | 20 #include "ui/base/l10n/l10n_util.h" |
21 | 21 |
22 #if defined(OS_WIN) | 22 #if defined(OS_WIN) |
23 #include "chrome/installer/util/wmi.h" | 23 #include "chrome/installer/util/wmi.h" |
24 #endif | 24 #endif |
25 | 25 |
| 26 using content::BrowserThread; |
| 27 |
26 namespace speech_input { | 28 namespace speech_input { |
27 | 29 |
28 // Asynchronously fetches the PC and audio hardware/driver info if | 30 // Asynchronously fetches the PC and audio hardware/driver info if |
29 // the user has opted into UMA. This information is sent with speech input | 31 // the user has opted into UMA. This information is sent with speech input |
30 // requests to the server for identifying and improving quality issues with | 32 // requests to the server for identifying and improving quality issues with |
31 // specific device configurations. | 33 // specific device configurations. |
32 class ChromeSpeechInputManager::OptionalRequestInfo | 34 class ChromeSpeechInputManager::OptionalRequestInfo |
33 : public base::RefCountedThreadSafe<OptionalRequestInfo> { | 35 : public base::RefCountedThreadSafe<OptionalRequestInfo> { |
34 public: | 36 public: |
35 OptionalRequestInfo() : can_report_metrics_(false) {} | 37 OptionalRequestInfo() : can_report_metrics_(false) {} |
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
209 StartRecognitionForRequest(caller_id); | 211 StartRecognitionForRequest(caller_id); |
210 } | 212 } |
211 } | 213 } |
212 | 214 |
213 void ChromeSpeechInputManager::InfoBubbleFocusChanged(int caller_id) { | 215 void ChromeSpeechInputManager::InfoBubbleFocusChanged(int caller_id) { |
214 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); | 216 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
215 OnFocusChanged(caller_id); | 217 OnFocusChanged(caller_id); |
216 } | 218 } |
217 | 219 |
218 } // namespace speech_input | 220 } // namespace speech_input |
OLD | NEW |