summaryrefslogtreecommitdiffstats
path: root/content/common
diff options
context:
space:
mode:
authoryujie.mao@intel.com <yujie.mao@intel.com@0039d316-1c4b-4281-b951-d872f2087c98>2012-04-30 16:19:20 +0000
committeryujie.mao@intel.com <yujie.mao@intel.com@0039d316-1c4b-4281-b951-d872f2087c98>2012-04-30 16:19:20 +0000
commite5bbe3d1366b0fda6d68aac22f904fd72f521b59 (patch)
treec685462ad34abc4a114e70bfd451bf0568af445c /content/common
parent5674720ea0ff65e5678cc85bc6e6c065ae20a06b (diff)
downloadchromium_src-e5bbe3d1366b0fda6d68aac22f904fd72f521b59.zip
chromium_src-e5bbe3d1366b0fda6d68aac22f904fd72f521b59.tar.gz
chromium_src-e5bbe3d1366b0fda6d68aac22f904fd72f521b59.tar.bz2
Shift media_stream::StreamOptions to align with the new getUserMedia spec
The new getUserMedia spec accept user media options like a dictionary format navigator.webkitGetUserMedia({audio:true, video:true}, ...) to replace its old style navigator.webkitGetUserMedia("audio, video", ...) BUG=113673 TEST=content_unittests, media_unittests Review URL: http://codereview.chromium.org/10177008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@134539 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/common')
-rw-r--r--content/common/media/media_stream_messages.h3
-rw-r--r--content/common/media/media_stream_options.h21
2 files changed, 8 insertions, 16 deletions
diff --git a/content/common/media/media_stream_messages.h b/content/common/media/media_stream_messages.h
index 75cd1ce..5a422cd 100644
--- a/content/common/media/media_stream_messages.h
+++ b/content/common/media/media_stream_messages.h
@@ -16,11 +16,10 @@
#define IPC_MESSAGE_START MediaStreamMsgStart
IPC_ENUM_TRAITS(media_stream::MediaStreamType)
-IPC_ENUM_TRAITS(media_stream::StreamOptions::VideoOption)
IPC_STRUCT_TRAITS_BEGIN(media_stream::StreamOptions)
IPC_STRUCT_TRAITS_MEMBER(audio)
- IPC_STRUCT_TRAITS_MEMBER(video_option)
+ IPC_STRUCT_TRAITS_MEMBER(video)
IPC_STRUCT_TRAITS_END()
IPC_STRUCT_TRAITS_BEGIN(media_stream::StreamDeviceInfo)
diff --git a/content/common/media/media_stream_options.h b/content/common/media/media_stream_options.h
index 1fa9efa..e5127ed 100644
--- a/content/common/media/media_stream_options.h
+++ b/content/common/media/media_stream_options.h
@@ -14,25 +14,18 @@
namespace media_stream {
// StreamOptions is a Chromium representation of WebKit's
-// WebGenerateStreamOptionFlags. It describes the components in a request for a
-// new media stream.
+// WebUserMediaRequest Options. It describes the components
+// in a request for a new media stream.
struct CONTENT_EXPORT StreamOptions {
- enum VideoOption {
- kNoCamera = 0,
- kFacingUser,
- kFacingEnvironment,
- kFacingBoth
- };
-
- StreamOptions() : audio(false), video_option(kNoCamera) {}
- StreamOptions(bool audio, VideoOption option)
- : audio(audio), video_option(option) {}
+ StreamOptions() : audio(false), video(false) {}
+ StreamOptions(bool audio, bool video)
+ : audio(audio), video(video) {}
// True if the stream shall contain an audio input stream.
bool audio;
- // Describes if a / which type of video capture device is requested.
- VideoOption video_option;
+ // True if the stream shall contain a video input stream.
+ bool video;
};
typedef content::MediaStreamDeviceType MediaStreamType;