| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_SHELL_BROWSER_SHELL_SPEECH_RECOGNITION_MANAGER_DELEGATE_H_ | 5 #ifndef CONTENT_SHELL_BROWSER_SHELL_SPEECH_RECOGNITION_MANAGER_DELEGATE_H_ |
| 6 #define CONTENT_SHELL_BROWSER_SHELL_SPEECH_RECOGNITION_MANAGER_DELEGATE_H_ | 6 #define CONTENT_SHELL_BROWSER_SHELL_SPEECH_RECOGNITION_MANAGER_DELEGATE_H_ |
| 7 | 7 |
| 8 #include "base/bind.h" | 8 #include "base/bind.h" |
| 9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| 11 #include "content/public/browser/speech_recognition_event_listener.h" | 11 #include "content/public/browser/speech_recognition_event_listener.h" |
| 12 #include "content/public/browser/speech_recognition_manager_delegate.h" | 12 #include "content/public/browser/speech_recognition_manager_delegate.h" |
| 13 | 13 |
| 14 namespace content { | 14 namespace content { |
| 15 | 15 |
| 16 // This is content_shell's delegate used by the speech recognition manager to | 16 // This is content_shell's delegate used by the speech recognition manager to |
| 17 // check for permission to record audio. For content_shell, we always authorize | 17 // check for permission to record audio. For content_shell, we always authorize |
| 18 // speech recognition (see crbug.com/237119). | 18 // speech recognition (see crbug.com/237119). |
| 19 class ShellSpeechRecognitionManagerDelegate | 19 class ShellSpeechRecognitionManagerDelegate |
| 20 : public SpeechRecognitionManagerDelegate { | 20 : public SpeechRecognitionManagerDelegate { |
| 21 public: | 21 public: |
| 22 ShellSpeechRecognitionManagerDelegate() {} | 22 ShellSpeechRecognitionManagerDelegate() {} |
| 23 ~ShellSpeechRecognitionManagerDelegate() override {} | 23 ~ShellSpeechRecognitionManagerDelegate() override {} |
| 24 | 24 |
| 25 // SpeechRecognitionManagerDelegate methods. | 25 // SpeechRecognitionManagerDelegate methods. |
| 26 void GetDiagnosticInformation(bool* can_report_metrics, | |
| 27 std::string* hardware_info) override {} | |
| 28 void CheckRecognitionIsAllowed( | 26 void CheckRecognitionIsAllowed( |
| 29 int session_id, | 27 int session_id, |
| 30 base::Callback<void(bool ask_user, bool is_allowed)> callback) override; | 28 base::Callback<void(bool ask_user, bool is_allowed)> callback) override; |
| 31 SpeechRecognitionEventListener* GetEventListener() override; | 29 SpeechRecognitionEventListener* GetEventListener() override; |
| 32 bool FilterProfanities(int render_process_id) override; | 30 bool FilterProfanities(int render_process_id) override; |
| 33 | 31 |
| 34 private: | 32 private: |
| 35 DISALLOW_COPY_AND_ASSIGN(ShellSpeechRecognitionManagerDelegate); | 33 DISALLOW_COPY_AND_ASSIGN(ShellSpeechRecognitionManagerDelegate); |
| 36 }; | 34 }; |
| 37 | 35 |
| 38 } // namespace content | 36 } // namespace content |
| 39 | 37 |
| 40 #endif // CONTENT_SHELL_BROWSER_SHELL_SPEECH_RECOGNITION_MANAGER_DELEGATE_H_ | 38 #endif // CONTENT_SHELL_BROWSER_SHELL_SPEECH_RECOGNITION_MANAGER_DELEGATE_H_ |
| OLD | NEW |