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

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

Issue 10177008: Shift media_stream::StreamOptions to align with the new getUserMedia spec (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 8 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/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 994725b9308187c29f8c5d4b440e5fe661829e83..28414cdfc5c2839389cc8e0dc4fa0569d33523e6 100644
--- a/content/browser/renderer_host/media/media_stream_manager.cc
+++ b/content/browser/renderer_host/media/media_stream_manager.cc
@@ -45,7 +45,7 @@ static std::string RandomLabel() {
static bool Requested(const StreamOptions& options,
MediaStreamType stream_type) {
if (stream_type == content::MEDIA_STREAM_DEVICE_TYPE_VIDEO_CAPTURE &&
- (options.video_option != StreamOptions::kNoCamera)) {
+ (options.video == true)) {
scherkus (not reviewing) 2012/04/27 17:52:40 nit: avoid explicit comparison to "true/false" --
return true;
} else if (stream_type == content::MEDIA_STREAM_DEVICE_TYPE_AUDIO_CAPTURE &&
options.audio == true) {
@@ -75,7 +75,7 @@ struct MediaStreamManager::DeviceRequest {
state(content::NUM_MEDIA_STREAM_DEVICE_TYPES, kNotRequested),
type(kGenerateStream) {
options.audio = false;
- options.video_option = StreamOptions::kNoCamera;
+ options.video = false;
}
DeviceRequest(MediaStreamRequester* requester,
@@ -228,7 +228,7 @@ void MediaStreamManager::EnumerateDevices(
if (type == content::MEDIA_STREAM_DEVICE_TYPE_AUDIO_CAPTURE)
options.audio = true;
else
- options.video_option = StreamOptions::kFacingUser;
+ options.video = true;
DeviceRequest new_request = DeviceRequest(requester, options);
new_request.type = DeviceRequest::kEnumerateDevices;
@@ -252,7 +252,7 @@ void MediaStreamManager::OpenDevice(
if (type == content::MEDIA_STREAM_DEVICE_TYPE_AUDIO_CAPTURE)
options.audio = true;
else
- options.video_option = StreamOptions::kFacingUser;
+ options.video = true;
DeviceRequest new_request = DeviceRequest(requester, options);
new_request.type = DeviceRequest::kOpenDevice;

Powered by Google App Engine
This is Rietveld 408576698