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

Unified Diff: content/public/common/media_stream_request.h

Issue 11446042: Make sure that all OpenDevice requests are scrutinized against the audio and video policies. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased again... Created 8 years 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/public/common/media_stream_request.h
diff --git a/content/public/common/media_stream_request.h b/content/public/common/media_stream_request.h
index 90210c4a186e8f429671402be3048e958388ccdd..497a163de65c1bbb8b6ffdf291187c9ad06e0982 100644
--- a/content/public/common/media_stream_request.h
+++ b/content/public/common/media_stream_request.h
@@ -30,6 +30,14 @@ enum MediaStreamDeviceType {
NUM_MEDIA_TYPES
};
+// Types of media stream requests that can be made to the media controller.
+enum MediaStreamRequestType {
+ MEDIA_DEVICE_ACCESS = 0,
+ MEDIA_GENERATE_STREAM,
+ MEDIA_ENUMERATE_DEVICES,
+ MEDIA_OPEN_DEVICE
+};
+
// Convenience predicates to determine whether the given type represents some
// audio or some video device.
CONTENT_EXPORT bool IsAudioMediaType(MediaStreamDeviceType type);
@@ -66,6 +74,7 @@ struct CONTENT_EXPORT MediaStreamRequest {
int render_process_id,
int render_view_id,
const GURL& security_origin,
+ MediaStreamRequestType request_type,
MediaStreamDeviceType audio_type,
MediaStreamDeviceType video_type);
@@ -80,6 +89,12 @@ struct CONTENT_EXPORT MediaStreamRequest {
// The WebKit security origin for the current request (e.g. "html5rocks.com").
GURL security_origin;
+ // Stores the type of request that was made to the media controller. Right now
+ // this is only used to destinguish between WebRTC and Pepper requests, as the
+ // latter should not be subject to user approval but only to policy check.
+ // Pepper requests are signified by the |MEDIA_OPEN_DEVICE| value.
+ MediaStreamRequestType request_type;
+
// Flag to indicate if the request contains audio.
MediaStreamDeviceType audio_type;

Powered by Google App Engine
This is Rietveld 408576698