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

Unified Diff: content/browser/renderer_host/media/audio_input_device_manager.h

Issue 8677012: Refactor the AudioInputDeviceManager by removing the device thread. (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: update Created 9 years, 1 month 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
« no previous file with comments | « no previous file | content/browser/renderer_host/media/audio_input_device_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_;
« no previous file with comments | « no previous file | content/browser/renderer_host/media/audio_input_device_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698