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 <stddef.h> | 8 #include <stddef.h> |
9 | 9 |
10 #include <map> | 10 #include <map> |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 MEDIA_DEVICE_NOT_SUPPORTED = 11, | 80 MEDIA_DEVICE_NOT_SUPPORTED = 11, |
81 MEDIA_DEVICE_FAILED_DUE_TO_SHUTDOWN = 12, | 81 MEDIA_DEVICE_FAILED_DUE_TO_SHUTDOWN = 12, |
82 MEDIA_DEVICE_KILL_SWITCH_ON = 13, | 82 MEDIA_DEVICE_KILL_SWITCH_ON = 13, |
83 NUM_MEDIA_REQUEST_RESULTS | 83 NUM_MEDIA_REQUEST_RESULTS |
84 }; | 84 }; |
85 | 85 |
86 // Convenience predicates to determine whether the given type represents some | 86 // Convenience predicates to determine whether the given type represents some |
87 // audio or some video device. | 87 // audio or some video device. |
88 CONTENT_EXPORT bool IsAudioInputMediaType(MediaStreamType type); | 88 CONTENT_EXPORT bool IsAudioInputMediaType(MediaStreamType type); |
89 CONTENT_EXPORT bool IsVideoMediaType(MediaStreamType type); | 89 CONTENT_EXPORT bool IsVideoMediaType(MediaStreamType type); |
| 90 CONTENT_EXPORT bool IsContentCaptureMediaType(MediaStreamType type); |
90 | 91 |
91 // TODO(xians): Change the structs to classes. | 92 // TODO(xians): Change the structs to classes. |
92 // Represents one device in a request for media stream(s). | 93 // Represents one device in a request for media stream(s). |
93 struct CONTENT_EXPORT MediaStreamDevice { | 94 struct CONTENT_EXPORT MediaStreamDevice { |
94 MediaStreamDevice(); | 95 MediaStreamDevice(); |
95 | 96 |
96 MediaStreamDevice( | 97 MediaStreamDevice( |
97 MediaStreamType type, | 98 MediaStreamType type, |
98 const std::string& id, | 99 const std::string& id, |
99 const std::string& name); | 100 const std::string& name); |
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
260 | 261 |
261 // Callback used return results of media access requests. | 262 // Callback used return results of media access requests. |
262 typedef base::Callback<void( | 263 typedef base::Callback<void( |
263 const MediaStreamDevices& devices, | 264 const MediaStreamDevices& devices, |
264 content::MediaStreamRequestResult result, | 265 content::MediaStreamRequestResult result, |
265 scoped_ptr<MediaStreamUI> ui)> MediaResponseCallback; | 266 scoped_ptr<MediaStreamUI> ui)> MediaResponseCallback; |
266 | 267 |
267 } // namespace content | 268 } // namespace content |
268 | 269 |
269 #endif // CONTENT_PUBLIC_COMMON_MEDIA_STREAM_REQUEST_H_ | 270 #endif // CONTENT_PUBLIC_COMMON_MEDIA_STREAM_REQUEST_H_ |
OLD | NEW |