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 IsScreenCaptureMediaType(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 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
265 | 266 |
266 // Callback used return results of media access requests. | 267 // Callback used return results of media access requests. |
267 typedef base::Callback<void(const MediaStreamDevices& devices, | 268 typedef base::Callback<void(const MediaStreamDevices& devices, |
268 content::MediaStreamRequestResult result, | 269 content::MediaStreamRequestResult result, |
269 std::unique_ptr<MediaStreamUI> ui)> | 270 std::unique_ptr<MediaStreamUI> ui)> |
270 MediaResponseCallback; | 271 MediaResponseCallback; |
271 | 272 |
272 } // namespace content | 273 } // namespace content |
273 | 274 |
274 #endif // CONTENT_PUBLIC_COMMON_MEDIA_STREAM_REQUEST_H_ | 275 #endif // CONTENT_PUBLIC_COMMON_MEDIA_STREAM_REQUEST_H_ |
OLD | NEW |