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> |
(...skipping 12 matching lines...) Expand all Loading... |
23 MEDIA_DEVICE_AUDIO_CAPTURE, | 23 MEDIA_DEVICE_AUDIO_CAPTURE, |
24 MEDIA_DEVICE_VIDEO_CAPTURE, | 24 MEDIA_DEVICE_VIDEO_CAPTURE, |
25 | 25 |
26 // Mirroring of a browser tab. | 26 // Mirroring of a browser tab. |
27 MEDIA_TAB_AUDIO_CAPTURE, | 27 MEDIA_TAB_AUDIO_CAPTURE, |
28 MEDIA_TAB_VIDEO_CAPTURE, | 28 MEDIA_TAB_VIDEO_CAPTURE, |
29 | 29 |
30 NUM_MEDIA_TYPES | 30 NUM_MEDIA_TYPES |
31 }; | 31 }; |
32 | 32 |
| 33 // Device id prefix schemes. |
| 34 CONTENT_EXPORT extern const char kMediaStreamTabDeviceScheme[]; |
| 35 |
33 // Convenience predicates to determine whether the given type represents some | 36 // Convenience predicates to determine whether the given type represents some |
34 // audio or some video device. | 37 // audio or some video device. |
35 CONTENT_EXPORT bool IsAudioMediaType(MediaStreamDeviceType type); | 38 CONTENT_EXPORT bool IsAudioMediaType(MediaStreamDeviceType type); |
36 CONTENT_EXPORT bool IsVideoMediaType(MediaStreamDeviceType type); | 39 CONTENT_EXPORT bool IsVideoMediaType(MediaStreamDeviceType type); |
37 | 40 |
38 // TODO(xians): Change the structs to classes. | 41 // TODO(xians): Change the structs to classes. |
39 // Represents one device in a request for media stream(s). | 42 // Represents one device in a request for media stream(s). |
40 struct CONTENT_EXPORT MediaStreamDevice { | 43 struct CONTENT_EXPORT MediaStreamDevice { |
41 MediaStreamDevice( | 44 MediaStreamDevice( |
42 MediaStreamDeviceType type, | 45 MediaStreamDeviceType type, |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 | 83 |
81 // A list of devices present on the user's computer, for each device type | 84 // A list of devices present on the user's computer, for each device type |
82 // requested. | 85 // requested. |
83 // All the elements in this map will be deleted in ~MediaStreamRequest(). | 86 // All the elements in this map will be deleted in ~MediaStreamRequest(). |
84 MediaStreamDeviceMap devices; | 87 MediaStreamDeviceMap devices; |
85 }; | 88 }; |
86 | 89 |
87 } // namespace content | 90 } // namespace content |
88 | 91 |
89 #endif // CONTENT_PUBLIC_COMMON_MEDIA_STREAM_REQUEST_H_ | 92 #endif // CONTENT_PUBLIC_COMMON_MEDIA_STREAM_REQUEST_H_ |
OLD | NEW |