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

Unified Diff: content/renderer/media/audio_message_filter.h

Issue 10537121: Adds AudioDevice factory for all audio clients in Chrome (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Moved AudioDeviceFactory to content namespace Created 8 years, 6 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: content/renderer/media/audio_message_filter.h
diff --git a/content/renderer/media/audio_message_filter.h b/content/renderer/media/audio_message_filter.h
index 40faeabec271c8d6fbd2c8c0ec3d5c4e221d9340..85d12fd5fb72edc5b80269fe441915f083f1b5dd 100644
--- a/content/renderer/media/audio_message_filter.h
+++ b/content/renderer/media/audio_message_filter.h
@@ -39,6 +39,9 @@ class CONTENT_EXPORT AudioMessageFilter
AudioMessageFilter();
+ // Getter for the one AudioMessageFilter object.
+ static AudioMessageFilter* current();
jam 2012/06/27 15:56:29 per style guide, since the implementation is in th
henrika (OOO until Aug 14) 2012/06/27 17:54:47 Got it. Not GetCurrent() then?
jam 2012/06/27 18:03:58 current() was named like because initially there w
henrika (OOO until Aug 14) 2012/06/28 11:36:01 Done.
+
// Add a delegate to the map and return id of the entry.
int32 AddDelegate(Delegate* delegate);
@@ -75,6 +78,10 @@ class CONTENT_EXPORT AudioMessageFilter
// changed.
void OnStreamStateChanged(int stream_id, AudioStreamState state);
+ // The singleton instance for this filter.
+ // Should only be accessed on the main renderer thread.
jam 2012/06/27 15:56:29 nit: i thought the whole point of exposing the get
henrika (OOO until Aug 14) 2012/06/27 17:54:47 I do need a vacation. Thanks.
henrika (OOO until Aug 14) 2012/06/28 11:36:01 Done.
+ static AudioMessageFilter* filter_;
+
// A map of stream ids to delegates.
IDMap<Delegate> delegates_;

Powered by Google App Engine
This is Rietveld 408576698