d663b4eaee
* chore: fix cpplint 'include_what_you_use' warnings Typically by including <memory>, <utility> etc. * chore: fix 'static/global string constant' warning Use C style strings instead of std::string. Style guide forbids non-trivial static / global variables. https://google.github.io/styleguide/cppguide.html#Static_and_Global_Variables /home/charles/electron/electron-gn/src/electron/script/cpplint.js * refactor: remove global string variables. Fix 'global string variables are not permitted' linter warnings by using the base::NoDestructor<> wrapper to make it explicit that these variables are never destroyed. The style guide's take on globals with nontrivial destructors: https://google.github.io/styleguide/cppguide.html#Static_and_Global_Variables * fix: initializer error introduced in last commit * fix: remove WIP file that was included by accident * fix: include order * fix: include order * fix: include order * fix: include order, again
62 lines
1.8 KiB
C++
62 lines
1.8 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 "atom/browser/atom_speech_recognition_manager_delegate.h"
|
|
|
|
#include <string>
|
|
#include <utility>
|
|
|
|
#include "base/callback.h"
|
|
|
|
namespace atom {
|
|
|
|
AtomSpeechRecognitionManagerDelegate::AtomSpeechRecognitionManagerDelegate() {}
|
|
|
|
AtomSpeechRecognitionManagerDelegate::~AtomSpeechRecognitionManagerDelegate() {}
|
|
|
|
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 content::SpeechRecognitionResults& result) {}
|
|
|
|
void AtomSpeechRecognitionManagerDelegate::OnRecognitionError(
|
|
int session_id,
|
|
const content::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 atom
|