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

Unified Diff: media/audio/audio_manager.h

Issue 66183002: Replace MessageLoopProxy with SingleThreadTaskRunner for the rest of media/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 1 month 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
Index: media/audio/audio_manager.h
diff --git a/media/audio/audio_manager.h b/media/audio/audio_manager.h
index ab9c82b0b28f552902cac9dd71ddd57581d743b0..43347d6fa02930b01b32bc9328ef823cab60463f 100644
--- a/media/audio/audio_manager.h
+++ b/media/audio/audio_manager.h
@@ -14,8 +14,7 @@
#include "media/audio/audio_parameters.h"
namespace base {
-class MessageLoop;
-class MessageLoopProxy;
+class SingleThreadTaskRunner;
}
namespace media {
@@ -64,14 +63,14 @@ class MEDIA_EXPORT AudioManager {
// recording.
//
// Not threadsafe; in production this should only be called from the
- // Audio IO thread (see GetMessageLoop).
+ // Audio IO thread (see GetTaskRunner()).
virtual void GetAudioInputDeviceNames(AudioDeviceNames* device_names) = 0;
// Appends a list of available output devices to |device_names|,
// which must initially be empty.
//
// Not threadsafe; in production this should only be called from the
- // Audio IO thread (see GetMessageLoop).
+ // Audio IO thread (see GetTaskRunner()).
virtual void GetAudioOutputDeviceNames(AudioDeviceNames* device_names) = 0;
// Factory for all the supported stream formats. |params| defines parameters
@@ -129,13 +128,13 @@ class MEDIA_EXPORT AudioManager {
virtual AudioInputStream* MakeAudioInputStream(
const AudioParameters& params, const std::string& device_id) = 0;
- // Returns message loop used for audio IO.
- virtual scoped_refptr<base::MessageLoopProxy> GetMessageLoop() = 0;
+ // Returns the task runner used for audio IO.
+ virtual scoped_refptr<base::SingleThreadTaskRunner> GetTaskRunner() = 0;
- // Heavyweight tasks should use GetWorkerLoop() instead of GetMessageLoop().
- // On most platforms they are the same, but some share the UI loop with the
- // audio IO loop.
- virtual scoped_refptr<base::MessageLoopProxy> GetWorkerLoop() = 0;
+ // Heavyweight tasks should use GetWorkerTaskRunner() instead of
+ // GetTaskRunner(). On most platforms they are the same, but some share the
+ // UI loop with the audio IO loop.
+ virtual scoped_refptr<base::SingleThreadTaskRunner> GetWorkerTaskRunner() = 0;
// Allows clients to listen for device state changes; e.g. preferred sample
// rate or channel layout changes. The typical response to receiving this

Powered by Google App Engine
This is Rietveld 408576698