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

Unified Diff: content/browser/renderer_host/media/media_stream_manager.cc

Issue 11298006: Browser-wide audio mirroring for TabCapture API (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Review comments, finish unit_tests Created 8 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
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..d273f6fbd8690c4a5306f298da755619fc702751 100644
--- a/content/browser/renderer_host/media/media_stream_manager.cc
+++ b/content/browser/renderer_host/media/media_stream_manager.cc
@@ -109,10 +109,17 @@ class MediaStreamManager::DeviceRequest {
if (media_observer == NULL)
return;
+ // If we appended a device_id scheme, we want to remove it when notifying
+ // observers which may be in different modules since this scheme is only
+ // used internally within the content module.
+ 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 {

Powered by Google App Engine
This is Rietveld 408576698