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

Unified Diff: content/renderer/media/peer_connection_tracker.cc

Issue 2123863004: ScreenCapture for Android phase1, part II (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: UI tweaking and rebase Created 4 years, 4 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/renderer/media/peer_connection_tracker.cc
diff --git a/content/renderer/media/peer_connection_tracker.cc b/content/renderer/media/peer_connection_tracker.cc
index c76674bde73cbdab54e5e00e6e53aa7016e5ab21..bf3aea1e29aa8159c44385187ca4383c8dc28363 100644
--- a/content/renderer/media/peer_connection_tracker.cc
+++ b/content/renderer/media/peer_connection_tracker.cc
@@ -707,9 +707,20 @@ void PeerConnectionTracker::TrackGetUserMedia(
const blink::WebUserMediaRequest& user_media_request) {
DCHECK(main_thread_.CalledOnValidThread());
+ std::string video_stream_source;
+ if (!user_media_request.videoConstraints().isNull()) {
+ const blink::WebMediaTrackConstraintSet& video_basic =
+ user_media_request.videoConstraints().basic();
+ if (!video_basic.mediaStreamSource.exact().isEmpty())
+ video_stream_source = video_basic.mediaStreamSource.exact()[0].utf8();
+ }
+
+ VideoInfo video_info;
+ video_info.video = user_media_request.video();
+ video_info.video_stream_source = video_stream_source;
SendTarget()->Send(new PeerConnectionTrackerHost_GetUserMedia(
user_media_request.getSecurityOrigin().toString().utf8(),
- user_media_request.audio(), user_media_request.video(),
+ user_media_request.audio(), video_info,
SerializeMediaConstraints(user_media_request.audioConstraints()),
SerializeMediaConstraints(user_media_request.videoConstraints())));
}

Powered by Google App Engine
This is Rietveld 408576698