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

Unified Diff: content/common/media/media_stream_options.cc

Issue 10928043: Media Related changes for TabCapture API (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Review fixes, fix unit tests. Created 8 years, 2 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/common/media/media_stream_options.cc
diff --git a/content/common/media/media_stream_options.cc b/content/common/media/media_stream_options.cc
index 524bc203f87f44c647a380e7c7461b4576d5308f..ec07c01694ecf74be2bfffcfbfceaea827922654 100644
--- a/content/common/media/media_stream_options.cc
+++ b/content/common/media/media_stream_options.cc
@@ -8,6 +8,10 @@
namespace media_stream {
+const char kMediaStreamSource[] = "chromeMediaSource";
+const char kMediaStreamSourceId[] = "chromeMediaSourceId";
+const char kMediaStreamSourceTab[] = "tab";
+
StreamOptions::StreamOptions()
: audio_type(content::MEDIA_NO_SERVICE),
video_type(content::MEDIA_NO_SERVICE) {}
@@ -29,6 +33,22 @@ StreamOptions::StreamOptions(MediaStreamType audio_type,
video_type == content::MEDIA_NO_SERVICE);
}
+StreamOptions::StreamOptions(MediaStreamType audio_type,
perkj_chrome 2012/10/12 13:22:05 Can you remove the other constructor?
justinlin 2012/10/12 20:04:20 Done.
+ std::string audio_device_id,
+ MediaStreamType video_type,
+ std::string video_device_id)
+ : audio_type(audio_type),
+ audio_device_id(audio_device_id),
+ video_type(video_type),
+ video_device_id(video_device_id) {
+ DCHECK(IsAudioMediaType(audio_type) ||
+ audio_type == content::MEDIA_NO_SERVICE);
+ DCHECK(!audio_device_id.empty());
+ DCHECK(IsVideoMediaType(video_type) ||
+ video_type == content::MEDIA_NO_SERVICE);
+ DCHECK(!video_device_id.empty());
perkj_chrome 2012/10/12 13:22:05 Isn't this empty in normal case.
justinlin 2012/10/12 20:04:20 Done.
+}
+
// static
const int StreamDeviceInfo::kNoId = -1;

Powered by Google App Engine
This is Rietveld 408576698