Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(254)

Unified Diff: media/audio/audio_system.h

Issue 2869733005: Convert some audio code to OnceCallback. (Closed)
Patch Set: Rebase, comments on unretained. Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/audio/audio_output_controller_unittest.cc ('k') | media/audio/audio_system_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/audio/audio_system.h
diff --git a/media/audio/audio_system.h b/media/audio/audio_system.h
index 932151ed3b9fadb7fa9aff3aefc985654e6ae345..b5498ad012ff9c81009413e23ac9a28b00d55d48 100644
--- a/media/audio/audio_system.h
+++ b/media/audio/audio_system.h
@@ -5,6 +5,8 @@
#ifndef MEDIA_AUDIO_AUDIO_SYSTEM_H_
#define MEDIA_AUDIO_AUDIO_SYSTEM_H_
+#include <string>
+
#include "base/callback.h"
#include "media/audio/audio_device_description.h"
#include "media/base/audio_parameters.h"
@@ -25,12 +27,13 @@ class MEDIA_EXPORT AudioSystem {
// Replies are asynchronously sent from audio system thread to the thread the
// call is issued on. Attention! Audio system thread may outlive the client
// objects; bind callbacks with care.
- using OnAudioParamsCallback = base::Callback<void(const AudioParameters&)>;
- using OnBoolCallback = base::Callback<void(bool)>;
+ using OnAudioParamsCallback =
+ base::OnceCallback<void(const AudioParameters&)>;
+ using OnBoolCallback = base::OnceCallback<void(bool)>;
using OnDeviceDescriptionsCallback =
- base::Callback<void(AudioDeviceDescriptions)>;
- using OnDeviceIdCallback = base::Callback<void(const std::string&)>;
- using OnInputDeviceInfoCallback = base::Callback<
+ base::OnceCallback<void(AudioDeviceDescriptions)>;
+ using OnDeviceIdCallback = base::OnceCallback<void(const std::string&)>;
+ using OnInputDeviceInfoCallback = base::OnceCallback<
void(const AudioParameters&, const AudioParameters&, const std::string&)>;
// Must not be called on audio system thread if it differs from the one
« no previous file with comments | « media/audio/audio_output_controller_unittest.cc ('k') | media/audio/audio_system_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698