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

Unified Diff: media/audio/audio_output_dispatcher.h

Issue 8818012: Remove the AudioManager singleton. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Address comments from Avi Created 9 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
===================================================================
--- media/audio/audio_output_dispatcher.h (revision 113173)
+++ media/audio/audio_output_dispatcher.h (working copy)
@@ -26,6 +26,7 @@
#include "base/basictypes.h"
#include "base/memory/ref_counted.h"
+#include "base/memory/weak_ptr.h"
#include "base/timer.h"
#include "media/audio/audio_manager.h"
#include "media/audio/audio_parameters.h"
@@ -64,6 +65,9 @@
// Called by AudioOutputProxy when the stream is closed.
void StreamClosed();
+ // Called on the audio thread when the AudioManager is shutting down.
+ void Shutdown();
+
MessageLoop* message_loop();
private:
@@ -91,8 +95,11 @@
int64 pause_delay_milliseconds_;
size_t paused_proxies_;
- std::vector<AudioOutputStream*> idle_streams_;
- std::list<AudioOutputStream*> pausing_streams_;
+ typedef std::list<AudioOutputStream*> AudioOutputStreamList;
+ AudioOutputStreamList idle_streams_;
+ AudioOutputStreamList pausing_streams_;
+ // Used to post delayed tasks to ourselves that we can cancel.
henrika (OOO until Aug 14) 2011/12/07 10:08:34 Nit, empty line above comment.
tommi (sloooow) - chröme 2011/12/07 12:26:44 Done.
+ base::WeakPtrFactory<AudioOutputDispatcher> weak_this_;
base::DelayTimer<AudioOutputDispatcher> close_timer_;
DISALLOW_COPY_AND_ASSIGN(AudioOutputDispatcher);

Powered by Google App Engine
This is Rietveld 408576698