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

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

Issue 10912004: Begin adding support for tab mirroring via the MediaStream audio/video capturing (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Changes after review by xians@. Created 8 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/common/media/media_stream_options.h
diff --git a/content/common/media/media_stream_options.h b/content/common/media/media_stream_options.h
index c51d700ee8b5a68088d444f6b429a23ec6c9e80d..2dc3877cb166d7b2b1fe343e904226c7b3d486e4 100644
--- a/content/common/media/media_stream_options.h
+++ b/content/common/media/media_stream_options.h
@@ -13,22 +13,28 @@
namespace media_stream {
+typedef content::MediaStreamDeviceType MediaStreamType;
+
// StreamOptions is a Chromium representation of WebKit's
// WebUserMediaRequest Options. It describes the components
// in a request for a new media stream.
struct CONTENT_EXPORT StreamOptions {
- StreamOptions() : audio(false), video(false) {}
- StreamOptions(bool audio, bool video)
- : audio(audio), video(video) {}
+ StreamOptions();
+ // TODO(miu): Remove the 2-bools ctor in later clean-up CL.
+ StreamOptions(bool user_audio, bool user_video);
+ StreamOptions(MediaStreamType audio_type, MediaStreamType video_type,
+ const std::string& opt_device_id);
- // True if the stream shall contain an audio input stream.
- bool audio;
+ // If not NO_SERVICE, the stream shall contain an audio input stream.
+ MediaStreamType audio_type;
- // True if the stream shall contain a video input stream.
- bool video;
-};
+ // If not NO_SERVICE, the stream shall contain a video input stream.
+ MediaStreamType video_type;
-typedef content::MediaStreamDeviceType MediaStreamType;
+ // If empty, user is allowed to choose from among all available devices.
+ // Otherwise, this selects a specific device.
+ std::string opt_device_id;
+};
// StreamDeviceInfo describes information about a device.
struct CONTENT_EXPORT StreamDeviceInfo {

Powered by Google App Engine
This is Rietveld 408576698