Chromium Code Reviews| 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 ccd868f39ff7e523666bd8a4807d4d933aaf01d6..62c29e3c768282d6daddc9b7796a1d2c4537cc12 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); |
| @@ -65,7 +73,8 @@ struct CONTENT_EXPORT MediaStreamRequest { |
| MediaStreamRequest( |
| int render_process_id, |
| int render_view_id, |
| - const GURL& security_origin); |
| + const GURL& security_origin, |
| + MediaStreamRequestType request_type); |
| ~MediaStreamRequest(); |
| @@ -78,6 +87,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 |
| + // later should not be subject to user approval but only to policy check. |
|
Jói
2012/12/12 14:58:12
later -> latter
|
| + // Pepper requests are signified by the |MEDIA_OPEN_DEVICE| value. |
| + MediaStreamRequestType request_type; |
| + |
| // A list of devices present on the user's computer, for each device type |
| // requested. |
| // All the elements in this map will be deleted in ~MediaStreamRequest(). |