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

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

Issue 10662049: Move the device enumerate/open/close work to device thread from IO thread (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: small changes to fix the trybots' failure Created 8 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/browser/renderer_host/media/video_capture_host.h
diff --git a/content/browser/renderer_host/media/video_capture_host.h b/content/browser/renderer_host/media/video_capture_host.h
index a66f475b6b72db061aac4f8e99f9742eded5330b..dbb8cbedb620779432c98e8fd6417d992f203924 100644
--- a/content/browser/renderer_host/media/video_capture_host.h
+++ b/content/browser/renderer_host/media/video_capture_host.h
@@ -45,20 +45,11 @@
#include "content/public/browser/browser_message_filter.h"
#include "ipc/ipc_message.h"
-namespace content {
-class ResourceContext;
-} // namespace content
-
-namespace media {
-class AudioManager;
-}
-
class CONTENT_EXPORT VideoCaptureHost
: public content::BrowserMessageFilter,
public VideoCaptureControllerEventHandler {
public:
- explicit VideoCaptureHost(content::ResourceContext* resource_context,
- media::AudioManager* audio_manager);
+ VideoCaptureHost();
// content::BrowserMessageFilter implementation.
virtual void OnChannelClosing() OVERRIDE;
@@ -140,18 +131,15 @@ class CONTENT_EXPORT VideoCaptureHost
void DeleteVideoCaptureControllerOnIOThread(
const VideoCaptureControllerID& controller_id);
- // Helpers.
- media_stream::VideoCaptureManager* GetVideoCaptureManager();
+ // Returns the video capture manager. This is a virtual function so that
+ // the unit tests can inject their own MediaStreamManager.
+ virtual media_stream::VideoCaptureManager* GetVideoCaptureManager();
struct Entry;
typedef std::map<VideoCaptureControllerID, Entry*> EntryMap;
// A map of VideoCaptureControllerID to its state and VideoCaptureController.
EntryMap entries_;
- // Used to get a pointer to VideoCaptureManager to start/stop capture devices.
- content::ResourceContext* resource_context_;
- media::AudioManager* audio_manager_;
-
DISALLOW_COPY_AND_ASSIGN(VideoCaptureHost);
};

Powered by Google App Engine
This is Rietveld 408576698