Chromium Code Reviews| 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 ce57ad940149fd49a319f3e08146072429f0324f..a2a7600066fce379c38e802f8fa9e6b006de7e04 100644 |
| --- a/content/renderer/media/audio_message_filter.h |
| +++ b/content/renderer/media/audio_message_filter.h |
| @@ -20,24 +20,14 @@ |
| #include "media/audio/audio_output_ipc.h" |
| class CONTENT_EXPORT AudioMessageFilter |
| - : public IPC::ChannelProxy::MessageFilter, |
| - public NON_EXPORTED_BASE(media::AudioOutputIPC) { |
| + : public IPC::ChannelProxy::MessageFilter { |
| public: |
| AudioMessageFilter(); |
| - // Getter for the one AudioMessageFilter object. |
| - static AudioMessageFilter* Get(); |
| - |
| - // media::AudioOutputIPCDelegate implementation. |
| - virtual int AddDelegate(media::AudioOutputIPCDelegate* delegate) OVERRIDE; |
| - virtual void RemoveDelegate(int id) OVERRIDE; |
| - virtual void CreateStream(int stream_id, |
| - const media::AudioParameters& params, int input_channels) OVERRIDE; |
| - virtual void PlayStream(int stream_id) OVERRIDE; |
| - virtual void PauseStream(int stream_id) OVERRIDE; |
| - virtual void FlushStream(int stream_id) OVERRIDE; |
| - virtual void CloseStream(int stream_id) OVERRIDE; |
| - virtual void SetVolume(int stream_id, double volume) OVERRIDE; |
| + // Creates an AudioOutputIPC which is used to send messages to/from the host |
| + // on behalf of a render view (i.e., the view which contains the object |
| + // rendering the audio). Caller owns the returned object. |
| + media::AudioOutputIPC* CreateAudioOutputIPC(int render_view_id); |
|
scherkus (not reviewing)
2012/10/18 01:56:28
ditto for scoped_ptr<>
miu
2012/10/18 03:27:26
Done.
|
| // IPC::ChannelProxy::MessageFilter override. Called on IO thread. |
| virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; |
| @@ -52,6 +42,8 @@ class CONTENT_EXPORT AudioMessageFilter |
| FRIEND_TEST_ALL_PREFIXES(AudioMessageFilterTest, Basic); |
| FRIEND_TEST_ALL_PREFIXES(AudioMessageFilterTest, Delegates); |
| + class AudioOutputIPCImpl; |
| + |
| // Sends an IPC message using |channel_|. |
| bool Send(IPC::Message* message); |
| @@ -69,9 +61,6 @@ class CONTENT_EXPORT AudioMessageFilter |
| void OnStreamStateChanged(int stream_id, |
| media::AudioOutputIPCDelegate::State state); |
| - // The singleton instance for this filter. |
| - static AudioMessageFilter* filter_; |
| - |
| // A map of stream ids to delegates. |
| IDMap<media::AudioOutputIPCDelegate> delegates_; |