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

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

Issue 9104043: Monitor the IO message loop in the AudioDevice classes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 11 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_input_device.h
diff --git a/content/renderer/media/audio_input_device.h b/content/renderer/media/audio_input_device.h
index 96dd2ff3ee779f0820b700312799d9319e86de91..e6e6f6a7c2aa7277ec2f689f104530754aa3ae44 100644
--- a/content/renderer/media/audio_input_device.h
+++ b/content/renderer/media/audio_input_device.h
@@ -78,6 +78,7 @@
#include "base/threading/simple_thread.h"
#include "content/common/content_export.h"
#include "content/renderer/media/audio_input_message_filter.h"
+#include "content/renderer/media/audio_device.h"
#include "media/audio/audio_parameters.h"
// TODO(henrika): This class is based on the AudioDevice class and it has
@@ -88,6 +89,7 @@
class CONTENT_EXPORT AudioInputDevice
: public AudioInputMessageFilter::Delegate,
public base::DelegateSimpleThread::Delegate,
+ public AudioDeviceIOLoopObserver<AudioInputDevice>,
public base::RefCountedThreadSafe<AudioInputDevice> {
public:
class CONTENT_EXPORT CaptureCallback {
@@ -162,6 +164,8 @@ class CONTENT_EXPORT AudioInputDevice
void InitializeOnIOThread();
void SetSessionIdOnIOThread(int session_id);
void StartOnIOThread();
+ // Allow AudioDeviceIOLoopObserver to call ShutDownOnIOThread.
+ friend class AudioDeviceIOLoopObserver<AudioInputDevice>;
void ShutDownOnIOThread(base::WaitableEvent* completion);
void SetVolumeOnIOThread(double volume);
// Closes socket and joins with the audio thread.

Powered by Google App Engine
This is Rietveld 408576698