Index: content/browser/renderer_host/media/audio_input_device_manager.h |
diff --git a/content/browser/renderer_host/media/audio_input_device_manager.h b/content/browser/renderer_host/media/audio_input_device_manager.h |
index 72196d71e6025b2827cfb91a1cab763155597220..e861499013784737bd17088cc396c9e283fb4d96 100644 |
--- a/content/browser/renderer_host/media/audio_input_device_manager.h |
+++ b/content/browser/renderer_host/media/audio_input_device_manager.h |
@@ -7,8 +7,7 @@ |
// browser IO thread, handles queries like enumerate/open/close from |
// MediaStreamManager and start/stop from AudioInputRendererHost. |
-// All the queries come from the IO thread, while the work to enumerate devices |
-// is done on its own thread. |
+// All the queries and work are handled on the IO thread. |
#ifndef CONTENT_BROWSER_RENDERER_HOST_MEDIA_AUDIO_INPUT_DEVICE_MANAGER_H_ |
#define CONTENT_BROWSER_RENDERER_HOST_MEDIA_AUDIO_INPUT_DEVICE_MANAGER_H_ |
@@ -52,46 +51,17 @@ class CONTENT_EXPORT AudioInputDeviceManager : public MediaStreamProvider { |
// Stop the device referenced by the session id. |
void Stop(int session_id); |
- // Function used for testing to mock platform dependent device code. |
- MessageLoop* message_loop(); |
- |
private: |
- // Executed on audio_input_device_thread_. |
- void EnumerateOnDeviceThread(); |
- void OpenOnDeviceThread(int session_id, const StreamDeviceInfo& device); |
- void CloseOnDeviceThread(int session_id); |
- void StartOnDeviceThread(int session_id); |
- void StopOnDeviceThread(int session_id); |
- |
// Executed on IO thread to call Listener. |
- void DevicesEnumeratedOnIOThread(const StreamDeviceInfoArray& devices); |
+ void DevicesEnumeratedOnIOThread(StreamDeviceInfoArray* devices); |
void OpenedOnIOThread(int session_id); |
void ClosedOnIOThread(int session_id); |
void ErrorOnIOThread(int session_id, MediaStreamProviderError error); |
- // Executed on IO thread to call the event handler. |
- void StartedOnIOThread(int session_id, const std::string& device_id); |
- void StoppedOnIOThread(int session_id); |
- |
- // Executed on audio_input_device_thread_ to make sure |
- // MediaStreamProviderListener is called from IO thread. |
- void SignalError(int session_id, MediaStreamProviderError error); |
- |
- // Helpers. |
- bool IsOnCaptureDeviceThread() const; |
- void UnregisterEventHandler(int session_id); |
- bool HasEventHandler(int session_id); |
- |
- // Thread for all calls to AudioInputDeviceManager. |
- base::Thread audio_input_device_thread_; |
- |
- // Only accessed on Browser::IO thread. |
MediaStreamProviderListener* listener_; |
int next_capture_session_id_; |
typedef std::map<int, AudioInputDeviceManagerEventHandler*> EventHandlerMap; |
EventHandlerMap event_handlers_; |
- |
- // Only accessed from audio_input_device_thread_. |
typedef std::map<int, media::AudioDeviceName> AudioInputDeviceMap; |
AudioInputDeviceMap devices_; |