| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 CHROME_BROWSER_SPEECH_CHROME_SPEECH_RECOGNITION_MANAGER_DELEGATE_H_ | 5 #ifndef CHROME_BROWSER_SPEECH_CHROME_SPEECH_RECOGNITION_MANAGER_DELEGATE_H_ |
| 6 #define CHROME_BROWSER_SPEECH_CHROME_SPEECH_RECOGNITION_MANAGER_DELEGATE_H_ | 6 #define CHROME_BROWSER_SPEECH_CHROME_SPEECH_RECOGNITION_MANAGER_DELEGATE_H_ |
| 7 | 7 |
| 8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
| 9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
| 10 #include "chrome/browser/speech/speech_recognition_bubble_controller.h" | 10 #include "chrome/browser/speech/speech_recognition_bubble_controller.h" |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 virtual void OnAudioLevelsChange(int session_id, float volume, | 46 virtual void OnAudioLevelsChange(int session_id, float volume, |
| 47 float noise_volume) OVERRIDE; | 47 float noise_volume) OVERRIDE; |
| 48 | 48 |
| 49 // SpeechRecognitionManagerDelegate methods. | 49 // SpeechRecognitionManagerDelegate methods. |
| 50 virtual void GetDiagnosticInformation(bool* can_report_metrics, | 50 virtual void GetDiagnosticInformation(bool* can_report_metrics, |
| 51 std::string* hardware_info) OVERRIDE; | 51 std::string* hardware_info) OVERRIDE; |
| 52 virtual void CheckRecognitionIsAllowed( | 52 virtual void CheckRecognitionIsAllowed( |
| 53 int session_id, | 53 int session_id, |
| 54 base::Callback<void(bool ask_user, bool is_allowed)> callback) OVERRIDE; | 54 base::Callback<void(bool ask_user, bool is_allowed)> callback) OVERRIDE; |
| 55 virtual content::SpeechRecognitionEventListener* GetEventListener() OVERRIDE; | 55 virtual content::SpeechRecognitionEventListener* GetEventListener() OVERRIDE; |
| 56 virtual void OnAbortSessionsForListener( |
| 57 SpeechRecognitionEventListener* listener) OVERRIDE; |
| 56 | 58 |
| 57 private: | 59 private: |
| 58 class OptionalRequestInfo; | 60 class OptionalRequestInfo; |
| 59 class TabWatcher; | 61 class TabWatcher; |
| 60 | 62 |
| 61 // Checks for VIEW_TYPE_TAB_CONTENTS host in the UI thread and notifies back | 63 // Checks for VIEW_TYPE_TAB_CONTENTS host in the UI thread and notifies back |
| 62 // the result in the IO thread through |callback|. | 64 // the result in the IO thread through |callback|. |
| 63 static void CheckRenderViewType( | 65 static void CheckRenderViewType( |
| 64 base::Callback<void(bool ask_user, bool is_allowed)> callback, | 66 base::Callback<void(bool ask_user, bool is_allowed)> callback, |
| 65 int render_process_id, | 67 int render_process_id, |
| (...skipping 14 matching lines...) Expand all Loading... |
| 80 scoped_refptr<OptionalRequestInfo> optional_request_info_; | 82 scoped_refptr<OptionalRequestInfo> optional_request_info_; |
| 81 scoped_ptr<content::SpeechRecognitionSessionConfig> last_session_config_; | 83 scoped_ptr<content::SpeechRecognitionSessionConfig> last_session_config_; |
| 82 scoped_refptr<TabWatcher> tab_watcher_; | 84 scoped_refptr<TabWatcher> tab_watcher_; |
| 83 | 85 |
| 84 DISALLOW_COPY_AND_ASSIGN(ChromeSpeechRecognitionManagerDelegate); | 86 DISALLOW_COPY_AND_ASSIGN(ChromeSpeechRecognitionManagerDelegate); |
| 85 }; | 87 }; |
| 86 | 88 |
| 87 } // namespace speech | 89 } // namespace speech |
| 88 | 90 |
| 89 #endif // CHROME_BROWSER_SPEECH_CHROME_SPEECH_RECOGNITION_MANAGER_DELEGATE_H_ | 91 #endif // CHROME_BROWSER_SPEECH_CHROME_SPEECH_RECOGNITION_MANAGER_DELEGATE_H_ |
| OLD | NEW |