2014-10-31 18:17:05 +00:00
|
|
|
// Copyright (c) 2014 GitHub, Inc.
|
2014-10-08 03:55:14 +00:00
|
|
|
// Use of this source code is governed by the MIT license that can be
|
|
|
|
// found in the LICENSE file.
|
|
|
|
|
2019-06-19 20:46:59 +00:00
|
|
|
#include "shell/browser/atom_speech_recognition_manager_delegate.h"
|
2014-10-08 03:55:14 +00:00
|
|
|
|
2014-10-08 09:47:47 +00:00
|
|
|
#include <string>
|
2018-09-13 00:25:56 +00:00
|
|
|
#include <utility>
|
2014-10-08 09:47:47 +00:00
|
|
|
|
2014-10-08 03:55:14 +00:00
|
|
|
#include "base/callback.h"
|
|
|
|
|
|
|
|
namespace atom {
|
|
|
|
|
2018-04-18 01:55:30 +00:00
|
|
|
AtomSpeechRecognitionManagerDelegate::AtomSpeechRecognitionManagerDelegate() {}
|
2014-10-08 03:55:14 +00:00
|
|
|
|
2018-04-18 01:55:30 +00:00
|
|
|
AtomSpeechRecognitionManagerDelegate::~AtomSpeechRecognitionManagerDelegate() {}
|
2014-10-08 03:55:14 +00:00
|
|
|
|
2018-04-18 01:55:30 +00:00
|
|
|
void AtomSpeechRecognitionManagerDelegate::OnRecognitionStart(int session_id) {}
|
2014-10-08 03:55:14 +00:00
|
|
|
|
2018-04-18 01:55:30 +00:00
|
|
|
void AtomSpeechRecognitionManagerDelegate::OnAudioStart(int session_id) {}
|
2014-10-08 03:55:14 +00:00
|
|
|
|
|
|
|
void AtomSpeechRecognitionManagerDelegate::OnEnvironmentEstimationComplete(
|
2018-04-18 01:55:30 +00:00
|
|
|
int session_id) {}
|
2014-10-08 03:55:14 +00:00
|
|
|
|
2018-04-18 01:55:30 +00:00
|
|
|
void AtomSpeechRecognitionManagerDelegate::OnSoundStart(int session_id) {}
|
2014-10-08 03:55:14 +00:00
|
|
|
|
2018-04-18 01:55:30 +00:00
|
|
|
void AtomSpeechRecognitionManagerDelegate::OnSoundEnd(int session_id) {}
|
2014-10-08 03:55:14 +00:00
|
|
|
|
2018-04-18 01:55:30 +00:00
|
|
|
void AtomSpeechRecognitionManagerDelegate::OnAudioEnd(int session_id) {}
|
2014-10-08 03:55:14 +00:00
|
|
|
|
2018-04-18 01:55:30 +00:00
|
|
|
void AtomSpeechRecognitionManagerDelegate::OnRecognitionEnd(int session_id) {}
|
2014-10-08 03:55:14 +00:00
|
|
|
|
|
|
|
void AtomSpeechRecognitionManagerDelegate::OnRecognitionResults(
|
2018-04-18 01:55:30 +00:00
|
|
|
int session_id,
|
2018-10-02 22:11:00 +00:00
|
|
|
const std::vector<blink::mojom::SpeechRecognitionResultPtr>& results) {}
|
2014-10-08 03:55:14 +00:00
|
|
|
|
|
|
|
void AtomSpeechRecognitionManagerDelegate::OnRecognitionError(
|
2018-04-18 01:55:30 +00:00
|
|
|
int session_id,
|
2018-10-02 22:11:00 +00:00
|
|
|
const blink::mojom::SpeechRecognitionError& error) {}
|
2014-10-08 03:55:14 +00:00
|
|
|
|
|
|
|
void AtomSpeechRecognitionManagerDelegate::OnAudioLevelsChange(
|
2018-04-18 01:55:30 +00:00
|
|
|
int session_id,
|
|
|
|
float volume,
|
|
|
|
float noise_volume) {}
|
2014-10-08 03:55:14 +00:00
|
|
|
|
|
|
|
void AtomSpeechRecognitionManagerDelegate::CheckRecognitionIsAllowed(
|
|
|
|
int session_id,
|
2017-08-20 21:53:03 +00:00
|
|
|
base::OnceCallback<void(bool ask_user, bool is_allowed)> callback) {
|
|
|
|
std::move(callback).Run(true, true);
|
2014-10-08 03:55:14 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
content::SpeechRecognitionEventListener*
|
|
|
|
AtomSpeechRecognitionManagerDelegate::GetEventListener() {
|
|
|
|
return this;
|
|
|
|
}
|
|
|
|
|
|
|
|
bool AtomSpeechRecognitionManagerDelegate::FilterProfanities(
|
|
|
|
int render_process_id) {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
} // namespace atom
|