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

Unified Diff: content/browser/renderer_host/media/media_stream_dispatcher_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/media_stream_dispatcher_host.h
diff --git a/content/browser/renderer_host/media/media_stream_dispatcher_host.h b/content/browser/renderer_host/media/media_stream_dispatcher_host.h
index 4218d7c43bdc67917b5c574dd0b8083acf9b584f..8ed45a0c9a3c785ef8e3033a5ef9fa9f4a7e9e57 100644
--- a/content/browser/renderer_host/media/media_stream_dispatcher_host.h
+++ b/content/browser/renderer_host/media/media_stream_dispatcher_host.h
@@ -15,10 +15,6 @@
#include "content/common/media/media_stream_options.h"
#include "content/public/browser/browser_message_filter.h"
-namespace content {
-class ResourceContext;
-} // namespace content
-
namespace media_stream {
// MediaStreamDispatcherHost is a delegate for Media Stream API messages used by
@@ -28,9 +24,7 @@ class CONTENT_EXPORT MediaStreamDispatcherHost
: public content::BrowserMessageFilter,
public MediaStreamRequester {
public:
- MediaStreamDispatcherHost(content::ResourceContext* resource_context,
- int render_process_id,
- media::AudioManager* audio_manager);
+ explicit MediaStreamDispatcherHost(int render_process_id);
// MediaStreamRequester implementation.
virtual void StreamGenerated(
@@ -78,12 +72,11 @@ class CONTENT_EXPORT MediaStreamDispatcherHost
const GURL& security_origin);
// Returns the media stream manager to forward events to,
- // creating one if needed.
- MediaStreamManager* manager();
+ // creating one if needed. It is a virtual function so that the unit tests
+ // can inject their own MediaStreamManager.
+ virtual MediaStreamManager* GetManager();
- content::ResourceContext* resource_context_;
int render_process_id_;
- media::AudioManager* audio_manager_;
struct StreamRequest;
typedef std::map<std::string, StreamRequest> StreamMap;

Powered by Google App Engine
This is Rietveld 408576698