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 #ifndef CONTENT_BROWSER_SPEECH_SPEECH_INPUT_MANAGER_H_ | 5 #ifndef CONTENT_BROWSER_SPEECH_SPEECH_INPUT_MANAGER_H_ |
6 #define CONTENT_BROWSER_SPEECH_SPEECH_INPUT_MANAGER_H_ | 6 #define CONTENT_BROWSER_SPEECH_SPEECH_INPUT_MANAGER_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "chrome/common/speech_input_result.h" | 9 #include "chrome/common/speech_input_result.h" |
10 #include "ui/gfx/rect.h" | 10 #include "ui/gfx/rect.h" |
(...skipping 17 matching lines...) Expand all Loading... |
28 virtual void DidCompleteRecognition(int caller_id) = 0; | 28 virtual void DidCompleteRecognition(int caller_id) = 0; |
29 | 29 |
30 protected: | 30 protected: |
31 virtual ~Delegate() {} | 31 virtual ~Delegate() {} |
32 }; | 32 }; |
33 | 33 |
34 // Whether the speech input feature is enabled, based on the browser channel | 34 // Whether the speech input feature is enabled, based on the browser channel |
35 // information and command line flags. | 35 // information and command line flags. |
36 static bool IsFeatureEnabled(); | 36 static bool IsFeatureEnabled(); |
37 | 37 |
| 38 // Invokes the platform provided microphone settings UI in a non-blocking way, |
| 39 // via the BrowserThread::PROCESS_LAUNCHER thread. |
| 40 static void ShowAudioInputSettings(); |
| 41 |
38 // Factory method to access the singleton. We have this method here instead of | 42 // Factory method to access the singleton. We have this method here instead of |
39 // using Singleton directly in the calling code to aid tests in injection | 43 // using Singleton directly in the calling code to aid tests in injection |
40 // mocks. | 44 // mocks. |
41 static SpeechInputManager* Get(); | 45 static SpeechInputManager* Get(); |
42 // Factory method definition useful for tests. | 46 // Factory method definition useful for tests. |
43 typedef SpeechInputManager* (AccessorMethod)(); | 47 typedef SpeechInputManager* (AccessorMethod)(); |
44 | 48 |
45 virtual ~SpeechInputManager() {} | 49 virtual ~SpeechInputManager() {} |
46 | 50 |
47 // Handlers for requests from render views. | 51 // Handlers for requests from render views. |
(...skipping 20 matching lines...) Expand all Loading... |
68 | 72 |
69 // This typedef is to workaround the issue with certain versions of | 73 // This typedef is to workaround the issue with certain versions of |
70 // Visual Studio where it gets confused between multiple Delegate | 74 // Visual Studio where it gets confused between multiple Delegate |
71 // classes and gives a C2500 error. (I saw this error on the try bots - | 75 // classes and gives a C2500 error. (I saw this error on the try bots - |
72 // the workaround was not needed for my machine). | 76 // the workaround was not needed for my machine). |
73 typedef SpeechInputManager::Delegate SpeechInputManagerDelegate; | 77 typedef SpeechInputManager::Delegate SpeechInputManagerDelegate; |
74 | 78 |
75 } // namespace speech_input | 79 } // namespace speech_input |
76 | 80 |
77 #endif // CONTENT_BROWSER_SPEECH_SPEECH_INPUT_MANAGER_H_ | 81 #endif // CONTENT_BROWSER_SPEECH_SPEECH_INPUT_MANAGER_H_ |
OLD | NEW |