Index: content/browser/renderer_host/media/media_stream_manager.cc |
diff --git a/content/browser/renderer_host/media/media_stream_manager.cc b/content/browser/renderer_host/media/media_stream_manager.cc |
index 1ca3520ff10042e8f2942b1b4896d644b2e4d8ad..557c92df98f44ec3c522ed0962b595da342fac37 100644 |
--- a/content/browser/renderer_host/media/media_stream_manager.cc |
+++ b/content/browser/renderer_host/media/media_stream_manager.cc |
@@ -109,10 +109,15 @@ class MediaStreamManager::DeviceRequest { |
if (media_observer == NULL) |
return; |
+ // We expect the device_id without the device_id scheme in chrome/. |
Alpha Left Google
2012/11/28 01:04:47
What does this mean?
justinlin
2012/11/28 14:30:31
Clarified the comment.
|
+ std::string device_id = |
+ WebContentsCaptureUtil::StripWebContentsDeviceScheme( |
+ requested_device_id); |
+ |
media_observer->OnMediaRequestStateChanged( |
render_process_id, render_view_id, |
MediaStreamDevice( |
- stream_type, requested_device_id, requested_device_id), new_state); |
+ stream_type, device_id, device_id), new_state); |
} |
MediaRequestState getState(MediaStreamType stream_type) const { |
@@ -275,7 +280,9 @@ void MediaStreamManager::GenerateStreamForDevice( |
request.setState(options.audio_type, MEDIA_REQUEST_STATE_PENDING_APPROVAL); |
ui_controller_->AddAvailableDevicesToRequest( |
*label, options.audio_type, StreamDeviceInfoArray( |
- 1, StreamDeviceInfo(options.audio_type, device_id, device_id, |
+ 1, StreamDeviceInfo(options.audio_type, |
Alpha Left Google
2012/11/28 01:04:47
No need to change this line isn't it?
justinlin
2012/11/28 14:30:31
Done.
|
+ device_id, |
+ device_id, |
false))); |
} |
if (IsVideoMediaType(options.video_type)) { |
@@ -283,7 +290,9 @@ void MediaStreamManager::GenerateStreamForDevice( |
request.setState(options.video_type, MEDIA_REQUEST_STATE_PENDING_APPROVAL); |
ui_controller_->AddAvailableDevicesToRequest( |
*label, options.video_type, StreamDeviceInfoArray( |
- 1, StreamDeviceInfo(options.video_type, device_id, device_id, |
+ 1, StreamDeviceInfo(options.video_type, |
Alpha Left Google
2012/11/28 01:04:47
Same for this line.
justinlin
2012/11/28 14:30:31
Done.
|
+ device_id, |
+ device_id, |
false))); |
} |
} |