Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CONTENT_PUBLIC_COMMON_MEDIA_STREAM_REQUEST_H_ | 5 #ifndef CONTENT_PUBLIC_COMMON_MEDIA_STREAM_REQUEST_H_ |
| 6 #define CONTENT_PUBLIC_COMMON_MEDIA_STREAM_REQUEST_H_ | 6 #define CONTENT_PUBLIC_COMMON_MEDIA_STREAM_REQUEST_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| 11 | 11 |
| 12 #include "base/basictypes.h" | 12 #include "base/basictypes.h" |
| 13 #include "content/common/content_export.h" | 13 #include "content/common/content_export.h" |
| 14 #include "googleurl/src/gurl.h" | 14 #include "googleurl/src/gurl.h" |
| 15 | 15 |
| 16 namespace content { | 16 namespace content { |
| 17 | 17 |
| 18 // MediaStreamConstraint keys. | |
|
perkj_chrome
2012/10/04 08:19:25
? This does not seem to have anything todo with co
perkj_chrome
2012/10/04 08:24:59
oh - I see. But media_stream_request.h is not used
justinlin
2012/10/08 08:59:45
Done.
justinlin
2012/10/08 08:59:45
Done.
justinlin
2012/10/08 18:50:03
Actually, I need access to access these from chrom
| |
| 19 CONTENT_EXPORT extern const char kMediaStreamSource[]; | |
| 20 CONTENT_EXPORT extern const char kMediaStreamSourceId[]; | |
| 21 | |
| 18 // Types of media streams. | 22 // Types of media streams. |
| 19 enum MediaStreamDeviceType { | 23 enum MediaStreamDeviceType { |
| 20 MEDIA_NO_SERVICE = 0, | 24 MEDIA_NO_SERVICE = 0, |
| 21 | 25 |
| 22 // A device provided by the operating system (e.g., webcam input). | 26 // A device provided by the operating system (e.g., webcam input). |
| 23 MEDIA_DEVICE_AUDIO_CAPTURE, | 27 MEDIA_DEVICE_AUDIO_CAPTURE, |
| 24 MEDIA_DEVICE_VIDEO_CAPTURE, | 28 MEDIA_DEVICE_VIDEO_CAPTURE, |
| 25 | 29 |
| 26 // Mirroring of a browser tab. | 30 // Mirroring of a browser tab. |
| 27 MEDIA_TAB_AUDIO_CAPTURE, | 31 MEDIA_TAB_AUDIO_CAPTURE, |
| (...skipping 27 matching lines...) Expand all Loading... | |
| 55 std::string name; | 59 std::string name; |
| 56 }; | 60 }; |
| 57 | 61 |
| 58 typedef std::vector<MediaStreamDevice> MediaStreamDevices; | 62 typedef std::vector<MediaStreamDevice> MediaStreamDevices; |
| 59 | 63 |
| 60 typedef std::map<MediaStreamDeviceType, MediaStreamDevices> | 64 typedef std::map<MediaStreamDeviceType, MediaStreamDevices> |
| 61 MediaStreamDeviceMap; | 65 MediaStreamDeviceMap; |
| 62 | 66 |
| 63 // Represents a request for media streams (audio/video). | 67 // Represents a request for media streams (audio/video). |
| 64 struct CONTENT_EXPORT MediaStreamRequest { | 68 struct CONTENT_EXPORT MediaStreamRequest { |
| 69 | |
| 70 enum RequestState { | |
| 71 STATE_NOT_REQUESTED = 0, | |
| 72 STATE_REQUESTED, | |
| 73 STATE_PENDING_APPROVAL, | |
| 74 STATE_OPENING, | |
| 75 STATE_DONE, | |
| 76 STATE_ERROR | |
| 77 }; | |
| 78 | |
| 65 MediaStreamRequest( | 79 MediaStreamRequest( |
| 66 int render_process_id, | 80 int render_process_id, |
| 67 int render_view_id, | 81 int render_view_id, |
| 68 const GURL& security_origin); | 82 const GURL& security_origin); |
| 69 | 83 |
| 70 ~MediaStreamRequest(); | 84 ~MediaStreamRequest(); |
| 71 | 85 |
| 72 // The render process id generating this request. | 86 // The render process id generating this request. |
| 73 int render_process_id; | 87 int render_process_id; |
| 74 | 88 |
| 75 // The render view id generating this request. | 89 // The render view id generating this request. |
| 76 int render_view_id; | 90 int render_view_id; |
| 77 | 91 |
| 78 // The WebKit security origin for the current request (e.g. "html5rocks.com"). | 92 // The WebKit security origin for the current request (e.g. "html5rocks.com"). |
| 79 GURL security_origin; | 93 GURL security_origin; |
| 80 | 94 |
| 81 // A list of devices present on the user's computer, for each device type | 95 // A list of devices present on the user's computer, for each device type |
| 82 // requested. | 96 // requested. |
| 83 // All the elements in this map will be deleted in ~MediaStreamRequest(). | 97 // All the elements in this map will be deleted in ~MediaStreamRequest(). |
| 84 MediaStreamDeviceMap devices; | 98 MediaStreamDeviceMap devices; |
| 85 }; | 99 }; |
| 86 | 100 |
| 87 } // namespace content | 101 } // namespace content |
| 88 | 102 |
| 89 #endif // CONTENT_PUBLIC_COMMON_MEDIA_STREAM_REQUEST_H_ | 103 #endif // CONTENT_PUBLIC_COMMON_MEDIA_STREAM_REQUEST_H_ |
| OLD | NEW |