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

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: Fixed nits in AudioRenderImpl unit test Created 9 years, 5 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 92113)
+++ content/renderer/media/audio_renderer_impl.h (working copy)
@@ -58,7 +58,7 @@
public MessageLoop::DestructionObserver {
public:
// Methods called on Render thread ------------------------------------------
- explicit AudioRendererImpl(AudioMessageFilter* filter);
+ explicit AudioRendererImpl();
virtual ~AudioRendererImpl();
// Methods called on IO thread ----------------------------------------------
@@ -101,6 +101,7 @@
// 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);
@@ -144,11 +145,12 @@
// Should be called before any class instance is created.
static void set_latency_type(LatencyType latency_type);
+ // Helper method for IPC send calls.
+ 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_;
@@ -156,15 +158,15 @@
scoped_ptr<base::SharedMemory> shared_memory_;
uint32 shared_memory_size_;
+ // Cached audio message filter (lives on the main render thread).
+ scoped_refptr<AudioMessageFilter> filter_;
+
// Low latency IPC stuff.
scoped_ptr<base::SyncSocket> socket_;
// That thread waits for audio input.
scoped_ptr<base::DelegateSimpleThread> audio_thread_;
- // Message loop for the IO thread.
- MessageLoop* io_loop_;
-
// Protects:
// - |stopped_|
// - |pending_request_|
« no previous file with comments | « content/renderer/media/audio_message_filter_unittest.cc ('k') | content/renderer/media/audio_renderer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698