| Index: content/renderer/media/audio_message_filter.h
|
| ===================================================================
|
| --- content/renderer/media/audio_message_filter.h (revision 89207)
|
| +++ content/renderer/media/audio_message_filter.h (working copy)
|
| @@ -13,6 +13,7 @@
|
|
|
| #include "base/gtest_prod_util.h"
|
| #include "base/id_map.h"
|
| +#include "base/memory/singleton.h"
|
| #include "base/shared_memory.h"
|
| #include "base/sync_socket.h"
|
| #include "content/common/audio_stream_state.h"
|
| @@ -52,9 +53,11 @@
|
| virtual ~Delegate() {}
|
| };
|
|
|
| - explicit AudioMessageFilter(int32 route_id);
|
| - virtual ~AudioMessageFilter();
|
| + static AudioMessageFilter* GetInstance();
|
|
|
| + // Sets the routing ID for all transmitted messages.
|
| + void SetRoutingID(int32 id);
|
| +
|
| // Add a delegate to the map and return id of the entry.
|
| int32 AddDelegate(Delegate* delegate);
|
|
|
| @@ -66,9 +69,12 @@
|
|
|
| MessageLoop* message_loop() { return message_loop_; }
|
|
|
| + int32 routing_id() { return routing_id_; }
|
| +
|
| private:
|
| - // For access to |message_loop_|.
|
| - friend class AudioRendererImplTest;
|
| + friend struct DefaultSingletonTraits<AudioMessageFilter>;
|
| + AudioMessageFilter();
|
| + virtual ~AudioMessageFilter();
|
|
|
| FRIEND_TEST_ALL_PREFIXES(AudioMessageFilterTest, Basic);
|
| FRIEND_TEST_ALL_PREFIXES(AudioMessageFilterTest, Delegates);
|
| @@ -110,7 +116,7 @@
|
|
|
| IPC::Channel* channel_;
|
|
|
| - int32 route_id_;
|
| + int32 routing_id_;
|
|
|
| MessageLoop* message_loop_;
|
|
|
|
|