Index: content/renderer/media/media_stream_dispatcher.cc |
diff --git a/content/renderer/media/media_stream_dispatcher.cc b/content/renderer/media/media_stream_dispatcher.cc |
index 228bd85e3155abe86fb4851bb5e55b274e8905e0..2d6d094127a40d71349fbadde2a93dc6a1d62065 100644 |
--- a/content/renderer/media/media_stream_dispatcher.cc |
+++ b/content/renderer/media/media_stream_dispatcher.cc |
@@ -72,33 +72,25 @@ void MediaStreamDispatcher::GenerateStream( |
media_stream::StreamOptions components, |
const GURL& security_origin) { |
DCHECK(main_loop_->BelongsToCurrentThread()); |
- DVLOG(1) << "MediaStreamDispatcher::GenerateStream(" << request_id << ")"; |
- |
requests_.push_back(Request(event_handler, request_id, next_ipc_id_)); |
+ |
+ if (components.audio_type == content::MEDIA_TAB_AUDIO_CAPTURE || |
perkj_chrome
2012/10/11 08:01:54
Why did you you keep MediaStreamHostMsg_GenerateSt
justinlin
2012/10/11 19:41:51
Done. Moved it to the host part and added TODO the
|
+ components.video_type == content::MEDIA_TAB_VIDEO_CAPTURE) { |
+ DVLOG(1) << "MediaStreamDispatcher::GenerateStreamForDevice(" |
+ << request_id << ")"; |
+ Send(new MediaStreamHostMsg_GenerateStreamForDevice( |
+ routing_id(), next_ipc_id_++, components, components.video_device_id, |
+ security_origin)); |
+ return; |
+ } |
+ |
+ DVLOG(1) << "MediaStreamDispatcher::GenerateStream(" << request_id << ")"; |
Send(new MediaStreamHostMsg_GenerateStream(routing_id(), |
next_ipc_id_++, |
components, |
security_origin)); |
} |
-void MediaStreamDispatcher::GenerateStreamForDevice( |
- int request_id, |
- const base::WeakPtr<MediaStreamDispatcherEventHandler>& event_handler, |
- media_stream::StreamOptions components, |
- const std::string& device_id, |
- const GURL& security_origin) { |
- DCHECK(main_loop_->BelongsToCurrentThread()); |
- DVLOG(1) << "MediaStreamDispatcher::GenerateStreamForDevice(" |
- << request_id << ")"; |
- |
- requests_.push_back(Request(event_handler, request_id, next_ipc_id_)); |
- Send(new MediaStreamHostMsg_GenerateStreamForDevice(routing_id(), |
- next_ipc_id_++, |
- components, |
- device_id, |
- security_origin)); |
-} |
- |
void MediaStreamDispatcher::CancelGenerateStream(int request_id) { |
DCHECK(main_loop_->BelongsToCurrentThread()); |
DVLOG(1) << "MediaStreamDispatcher::CancelGenerateStream" |