atom_speech_recognition_manager_delegate.cc 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. // Copyright (c) 2014 GitHub, Inc.
  2. // Use of this source code is governed by the MIT license that can be
  3. // found in the LICENSE file.
  4. #include "atom/browser/atom_speech_recognition_manager_delegate.h"
  5. #include <string>
  6. #include "base/callback.h"
  7. namespace atom {
  8. AtomSpeechRecognitionManagerDelegate::AtomSpeechRecognitionManagerDelegate() {}
  9. AtomSpeechRecognitionManagerDelegate::~AtomSpeechRecognitionManagerDelegate() {}
  10. void AtomSpeechRecognitionManagerDelegate::OnRecognitionStart(int session_id) {}
  11. void AtomSpeechRecognitionManagerDelegate::OnAudioStart(int session_id) {}
  12. void AtomSpeechRecognitionManagerDelegate::OnEnvironmentEstimationComplete(
  13. int session_id) {}
  14. void AtomSpeechRecognitionManagerDelegate::OnSoundStart(int session_id) {}
  15. void AtomSpeechRecognitionManagerDelegate::OnSoundEnd(int session_id) {}
  16. void AtomSpeechRecognitionManagerDelegate::OnAudioEnd(int session_id) {}
  17. void AtomSpeechRecognitionManagerDelegate::OnRecognitionEnd(int session_id) {}
  18. void AtomSpeechRecognitionManagerDelegate::OnRecognitionResults(
  19. int session_id,
  20. const content::SpeechRecognitionResults& result) {}
  21. void AtomSpeechRecognitionManagerDelegate::OnRecognitionError(
  22. int session_id,
  23. const content::SpeechRecognitionError& error) {}
  24. void AtomSpeechRecognitionManagerDelegate::OnAudioLevelsChange(
  25. int session_id,
  26. float volume,
  27. float noise_volume) {}
  28. void AtomSpeechRecognitionManagerDelegate::CheckRecognitionIsAllowed(
  29. int session_id,
  30. base::OnceCallback<void(bool ask_user, bool is_allowed)> callback) {
  31. std::move(callback).Run(true, true);
  32. }
  33. content::SpeechRecognitionEventListener*
  34. AtomSpeechRecognitionManagerDelegate::GetEventListener() {
  35. return this;
  36. }
  37. bool AtomSpeechRecognitionManagerDelegate::FilterProfanities(
  38. int render_process_id) {
  39. return false;
  40. }
  41. } // namespace atom