| 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 CONTENT_PUBLIC_BROWSER_SPEECH_RECOGNITION_MANAGER_DELEGATE_H_ | 5 #ifndef CONTENT_PUBLIC_BROWSER_SPEECH_RECOGNITION_MANAGER_DELEGATE_H_ |
| 6 #define CONTENT_PUBLIC_BROWSER_SPEECH_RECOGNITION_MANAGER_DELEGATE_H_ | 6 #define CONTENT_PUBLIC_BROWSER_SPEECH_RECOGNITION_MANAGER_DELEGATE_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/callback_forward.h" | 10 #include "base/callback_forward.h" |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 | 23 |
| 24 // Get the optional diagnostic hardware information if available. | 24 // Get the optional diagnostic hardware information if available. |
| 25 virtual void GetDiagnosticInformation(bool* can_report_metrics, | 25 virtual void GetDiagnosticInformation(bool* can_report_metrics, |
| 26 std::string* hardware_info) = 0; | 26 std::string* hardware_info) = 0; |
| 27 | 27 |
| 28 // Checks (asynchronously) if current setup allows speech recognition. | 28 // Checks (asynchronously) if current setup allows speech recognition. |
| 29 virtual void CheckRecognitionIsAllowed( | 29 virtual void CheckRecognitionIsAllowed( |
| 30 int session_id, | 30 int session_id, |
| 31 base::Callback<void(bool ask_user, bool is_allowed)> callback) = 0; | 31 base::Callback<void(bool ask_user, bool is_allowed)> callback) = 0; |
| 32 | 32 |
| 33 // Called when the event listener is going away for the sessions. |
| 34 virtual void OnAbortSessionsForListener( |
| 35 SpeechRecognitionEventListener* listener) = 0; |
| 36 |
| 33 // Checks whether the delegate is interested (returning a non NULL ptr) or not | 37 // Checks whether the delegate is interested (returning a non NULL ptr) or not |
| 34 // (returning NULL) in receiving a copy of all sessions events. | 38 // (returning NULL) in receiving a copy of all sessions events. |
| 35 virtual SpeechRecognitionEventListener* GetEventListener() = 0; | 39 virtual SpeechRecognitionEventListener* GetEventListener() = 0; |
| 36 }; | 40 }; |
| 37 | 41 |
| 38 } // namespace content | 42 } // namespace content |
| 39 | 43 |
| 40 #endif // CONTENT_PUBLIC_BROWSER_SPEECH_RECOGNITION_MANAGER_DELEGATE_H_ | 44 #endif // CONTENT_PUBLIC_BROWSER_SPEECH_RECOGNITION_MANAGER_DELEGATE_H_ |
| OLD | NEW |