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

Unified Diff: media/audio/audio_output_dispatcher.h

Issue 2570923002: Makes AudioOutputDispatcher non-ref-counted. (Closed)
Patch Set: Created 4 years 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_output_dispatcher.h
diff --git a/media/audio/audio_output_dispatcher.h b/media/audio/audio_output_dispatcher.h
index c7dbf0efd938018fcbc69dfaab92e7101087d48c..f94f95f65389c657cef60a3393acc0ceebbd45f0 100644
--- a/media/audio/audio_output_dispatcher.h
+++ b/media/audio/audio_output_dispatcher.h
@@ -19,7 +19,6 @@
#define MEDIA_AUDIO_AUDIO_OUTPUT_DISPATCHER_H_
#include "base/macros.h"
-#include "base/memory/ref_counted.h"
#include "media/audio/audio_io.h"
#include "media/audio/audio_manager.h"
#include "media/base/audio_parameters.h"
@@ -32,12 +31,12 @@ namespace media {
class AudioOutputProxy;
-class MEDIA_EXPORT AudioOutputDispatcher
- : public base::RefCountedThreadSafe<AudioOutputDispatcher> {
+class MEDIA_EXPORT AudioOutputDispatcher {
public:
AudioOutputDispatcher(AudioManager* audio_manager,
const AudioParameters& params,
const std::string& device_id);
+ virtual ~AudioOutputDispatcher();
// Called by AudioOutputProxy to open the stream.
// Returns false, if it fails to open it.
@@ -61,15 +60,9 @@ class MEDIA_EXPORT AudioOutputDispatcher
// Called by AudioOutputProxy when the stream is closed.
virtual void CloseStream(AudioOutputProxy* stream_proxy) = 0;
- // Called on the audio thread when the AudioManager is shutting down.
- virtual void Shutdown() = 0;
-
const std::string& device_id() const { return device_id_; }
protected:
- friend class base::RefCountedThreadSafe<AudioOutputDispatcher>;
- virtual ~AudioOutputDispatcher();
-
// A no-reference-held pointer (we don't want circular references) back to the
// AudioManager that owns this object.
AudioManager* audio_manager_;

Powered by Google App Engine
This is Rietveld 408576698