From 95669048387d1e1e5f8e28cc1f03d137049de219 Mon Sep 17 00:00:00 2001 From: Aleksei Kuzmin Date: Mon, 21 Aug 2017 00:53:03 +0300 Subject: [PATCH] Speech recognition: Use BindOnce / OnceCallback / OnceClosure where applicable https://chromium-review.googlesource.com/c/565762 --- atom/browser/atom_speech_recognition_manager_delegate.cc | 4 ++-- atom/browser/atom_speech_recognition_manager_delegate.h | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/atom/browser/atom_speech_recognition_manager_delegate.cc b/atom/browser/atom_speech_recognition_manager_delegate.cc index d2e7135c9af..d879eb9c6e9 100644 --- a/atom/browser/atom_speech_recognition_manager_delegate.cc +++ b/atom/browser/atom_speech_recognition_manager_delegate.cc @@ -52,8 +52,8 @@ void AtomSpeechRecognitionManagerDelegate::OnAudioLevelsChange( void AtomSpeechRecognitionManagerDelegate::CheckRecognitionIsAllowed( int session_id, - base::Callback callback) { - callback.Run(true, true); + base::OnceCallback callback) { + std::move(callback).Run(true, true); } content::SpeechRecognitionEventListener* diff --git a/atom/browser/atom_speech_recognition_manager_delegate.h b/atom/browser/atom_speech_recognition_manager_delegate.h index a6b2f059f7a..860cbc675d3 100644 --- a/atom/browser/atom_speech_recognition_manager_delegate.h +++ b/atom/browser/atom_speech_recognition_manager_delegate.h @@ -38,7 +38,8 @@ class AtomSpeechRecognitionManagerDelegate // content::SpeechRecognitionManagerDelegate: void CheckRecognitionIsAllowed( int session_id, - base::Callback callback) override; + base::OnceCallback callback) + override; content::SpeechRecognitionEventListener* GetEventListener() override; bool FilterProfanities(int render_process_id) override;