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

Unified Diff: media/audio/audio_output_dispatcher.h

Issue 2621993002: Makes AudioOutputProxy -> AudioOutputDispatcher reference weak. (Closed)
Patch Set: Created 3 years, 11 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
Index: media/audio/audio_output_dispatcher.h
diff --git a/media/audio/audio_output_dispatcher.h b/media/audio/audio_output_dispatcher.h
index f94f95f65389c657cef60a3393acc0ceebbd45f0..92aaf3d5e196b388cbca43b863be2569e89d5a1a 100644
--- a/media/audio/audio_output_dispatcher.h
+++ b/media/audio/audio_output_dispatcher.h
@@ -19,6 +19,7 @@
#define MEDIA_AUDIO_AUDIO_OUTPUT_DISPATCHER_H_
#include "base/macros.h"
+#include "base/memory/weak_ptr.h"
#include "media/audio/audio_io.h"
#include "media/audio/audio_manager.h"
#include "media/base/audio_parameters.h"
@@ -31,7 +32,8 @@ namespace media {
class AudioOutputProxy;
-class MEDIA_EXPORT AudioOutputDispatcher {
+class MEDIA_EXPORT AudioOutputDispatcher
+ : public base::SupportsWeakPtr<AudioOutputDispatcher> {
DaleCurtis 2017/01/10 20:54:40 Instead of adding this can you make the constructo
alokp 2017/01/10 22:51:26 A Create method will not work because AMB still ne
DaleCurtis 2017/01/10 22:58:08 what about AOD::CreateProxy() which returns an Aud
alokp 2017/01/10 23:31:53 Yes - this should work. Done.
public:
AudioOutputDispatcher(AudioManager* audio_manager,
const AudioParameters& params,

Powered by Google App Engine
This is Rietveld 408576698