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

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

Issue 7157001: Implements AudioMessageFilter as member in RenderThread (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: Finalized the AudioRenderImpl unit test Created 9 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_renderer_impl.h
===================================================================
--- content/renderer/media/audio_renderer_impl.h (revision 90962)
+++ content/renderer/media/audio_renderer_impl.h (working copy)
@@ -56,7 +56,7 @@
public MessageLoop::DestructionObserver {
public:
// Methods called on Render thread ------------------------------------------
- explicit AudioRendererImpl(AudioMessageFilter* filter);
+ AudioRendererImpl();
virtual ~AudioRendererImpl();
// Methods called on IO thread ----------------------------------------------
@@ -91,9 +91,11 @@
private:
// For access to constructor and IO thread methods.
friend class AudioRendererImplTest;
+ friend class DelegateCaller;
FRIEND_TEST_ALL_PREFIXES(AudioRendererImplTest, Stop);
FRIEND_TEST_ALL_PREFIXES(AudioRendererImplTest,
DestroyedMessageLoop_ConsumeAudioSamples);
+
// Helper methods.
// Convert number of bytes to duration of time using information about the
// number of channels, sample rate and sample bits.
@@ -114,11 +116,11 @@
// Called on IO thread when message loop is dying.
virtual void WillDestroyCurrentMessageLoop();
+ void Send(IPC::Message* message);
+
// Used to calculate audio delay given bytes.
uint32 bytes_per_second_;
- scoped_refptr<AudioMessageFilter> filter_;
-
// ID of the stream created in the browser process.
int32 stream_id_;
@@ -126,8 +128,8 @@
scoped_ptr<base::SharedMemory> shared_memory_;
uint32 shared_memory_size_;
- // Message loop for the IO thread.
- MessageLoop* io_loop_;
+ // Cached audio message filter (lives on the main render thread).
+ scoped_refptr<AudioMessageFilter> filter_;
// Protects:
// - |stopped_|

Powered by Google App Engine
This is Rietveld 408576698