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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 MEDIA_DEVICE_PERMISSION_DISMISSED = 2, | 73 MEDIA_DEVICE_PERMISSION_DISMISSED = 2, |
74 MEDIA_DEVICE_INVALID_STATE = 3, | 74 MEDIA_DEVICE_INVALID_STATE = 3, |
75 MEDIA_DEVICE_NO_HARDWARE = 4, | 75 MEDIA_DEVICE_NO_HARDWARE = 4, |
76 MEDIA_DEVICE_INVALID_SECURITY_ORIGIN = 5, | 76 MEDIA_DEVICE_INVALID_SECURITY_ORIGIN = 5, |
77 MEDIA_DEVICE_TAB_CAPTURE_FAILURE = 6, | 77 MEDIA_DEVICE_TAB_CAPTURE_FAILURE = 6, |
78 MEDIA_DEVICE_SCREEN_CAPTURE_FAILURE = 7, | 78 MEDIA_DEVICE_SCREEN_CAPTURE_FAILURE = 7, |
79 MEDIA_DEVICE_CAPTURE_FAILURE = 8, | 79 MEDIA_DEVICE_CAPTURE_FAILURE = 8, |
80 MEDIA_DEVICE_CONSTRAINT_NOT_SATISFIED = 9, | 80 MEDIA_DEVICE_CONSTRAINT_NOT_SATISFIED = 9, |
81 MEDIA_DEVICE_TRACK_START_FAILURE = 10, | 81 MEDIA_DEVICE_TRACK_START_FAILURE = 10, |
82 MEDIA_DEVICE_NOT_SUPPORTED = 11, | 82 MEDIA_DEVICE_NOT_SUPPORTED = 11, |
| 83 MEDIA_DEVICE_FAILED_DUE_TO_SHUTDOWN = 12, |
83 NUM_MEDIA_REQUEST_RESULTS | 84 NUM_MEDIA_REQUEST_RESULTS |
84 }; | 85 }; |
85 | 86 |
86 // Convenience predicates to determine whether the given type represents some | 87 // Convenience predicates to determine whether the given type represents some |
87 // audio or some video device. | 88 // audio or some video device. |
88 CONTENT_EXPORT bool IsAudioInputMediaType(MediaStreamType type); | 89 CONTENT_EXPORT bool IsAudioInputMediaType(MediaStreamType type); |
89 CONTENT_EXPORT bool IsVideoMediaType(MediaStreamType type); | 90 CONTENT_EXPORT bool IsVideoMediaType(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). |
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
262 | 263 |
263 // Callback used return results of media access requests. | 264 // Callback used return results of media access requests. |
264 typedef base::Callback<void( | 265 typedef base::Callback<void( |
265 const MediaStreamDevices& devices, | 266 const MediaStreamDevices& devices, |
266 content::MediaStreamRequestResult result, | 267 content::MediaStreamRequestResult result, |
267 scoped_ptr<MediaStreamUI> ui)> MediaResponseCallback; | 268 scoped_ptr<MediaStreamUI> ui)> MediaResponseCallback; |
268 | 269 |
269 } // namespace content | 270 } // namespace content |
270 | 271 |
271 #endif // CONTENT_PUBLIC_COMMON_MEDIA_STREAM_REQUEST_H_ | 272 #endif // CONTENT_PUBLIC_COMMON_MEDIA_STREAM_REQUEST_H_ |
OLD | NEW |