electron/shell/browser/atom_speech_recognition_manager_delegate.cc
Charles Kerr 2b316f3843
refactor: run clang-tidy (#20231)
* refactor: clang-tidy modernize-use-nullptr

* refactor: clang-tidy modernize-use-equals-default

* refactor: clang-tidy modernize-make-unique

* refactor: omit nullptr arg from unique_ptr.reset()

As per comment by @miniak
2019-09-16 18:12:00 -04:00

64 lines
1.9 KiB
C++

// Copyright (c) 2014 GitHub, Inc.
// Use of this source code is governed by the MIT license that can be
// found in the LICENSE file.
#include "shell/browser/atom_speech_recognition_manager_delegate.h"
#include <string>
#include <utility>
#include "base/callback.h"
namespace electron {
AtomSpeechRecognitionManagerDelegate::AtomSpeechRecognitionManagerDelegate() =
default;
AtomSpeechRecognitionManagerDelegate::~AtomSpeechRecognitionManagerDelegate() =
default;
void AtomSpeechRecognitionManagerDelegate::OnRecognitionStart(int session_id) {}
void AtomSpeechRecognitionManagerDelegate::OnAudioStart(int session_id) {}
void AtomSpeechRecognitionManagerDelegate::OnEnvironmentEstimationComplete(
int session_id) {}
void AtomSpeechRecognitionManagerDelegate::OnSoundStart(int session_id) {}
void AtomSpeechRecognitionManagerDelegate::OnSoundEnd(int session_id) {}
void AtomSpeechRecognitionManagerDelegate::OnAudioEnd(int session_id) {}
void AtomSpeechRecognitionManagerDelegate::OnRecognitionEnd(int session_id) {}
void AtomSpeechRecognitionManagerDelegate::OnRecognitionResults(
int session_id,
const std::vector<blink::mojom::SpeechRecognitionResultPtr>& results) {}
void AtomSpeechRecognitionManagerDelegate::OnRecognitionError(
int session_id,
const blink::mojom::SpeechRecognitionError& error) {}
void AtomSpeechRecognitionManagerDelegate::OnAudioLevelsChange(
int session_id,
float volume,
float noise_volume) {}
void AtomSpeechRecognitionManagerDelegate::CheckRecognitionIsAllowed(
int session_id,
base::OnceCallback<void(bool ask_user, bool is_allowed)> callback) {
std::move(callback).Run(true, true);
}
content::SpeechRecognitionEventListener*
AtomSpeechRecognitionManagerDelegate::GetEventListener() {
return this;
}
bool AtomSpeechRecognitionManagerDelegate::FilterProfanities(
int render_process_id) {
return false;
}
} // namespace electron