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_COMMON_MEDIA_MEDIA_STREAM_OPTIONS_H_ | 5 #ifndef CONTENT_COMMON_MEDIA_MEDIA_STREAM_OPTIONS_H_ |
6 #define CONTENT_COMMON_MEDIA_MEDIA_STREAM_OPTIONS_H_ | 6 #define CONTENT_COMMON_MEDIA_MEDIA_STREAM_OPTIONS_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "base/callback.h" | |
12 #include "content/common/content_export.h" | 11 #include "content/common/content_export.h" |
13 #include "content/public/common/media_stream_request.h" | 12 #include "content/public/common/media_stream_request.h" |
14 | 13 |
15 namespace content { | 14 namespace content { |
16 | 15 |
17 // MediaStreamConstraint keys for constraints that are passed to getUserMedia. | 16 // MediaStreamConstraint keys for constraints that are passed to getUserMedia. |
18 CONTENT_EXPORT extern const char kMediaStreamSource[]; | 17 CONTENT_EXPORT extern const char kMediaStreamSource[]; |
19 CONTENT_EXPORT extern const char kMediaStreamSourceId[]; | 18 CONTENT_EXPORT extern const char kMediaStreamSourceId[]; |
20 CONTENT_EXPORT extern const char kMediaStreamSourceTab[]; | 19 CONTENT_EXPORT extern const char kMediaStreamSourceTab[]; |
21 CONTENT_EXPORT extern const char kMediaStreamSourceScreen[]; | 20 CONTENT_EXPORT extern const char kMediaStreamSourceScreen[]; |
22 | 21 |
23 // Callback to deliver the result of a media request. |label| is the string | |
24 // to identify the request, | |
25 typedef base::Callback< void(const std::string&, const MediaStreamDevices&) > | |
26 MediaRequestResponseCallback; | |
27 | |
28 // StreamOptions is a Chromium representation of WebKit's | 22 // StreamOptions is a Chromium representation of WebKit's |
29 // WebUserMediaRequest Options. It describes the components | 23 // WebUserMediaRequest Options. It describes the components |
30 // in a request for a new media stream. | 24 // in a request for a new media stream. |
31 struct CONTENT_EXPORT StreamOptions { | 25 struct CONTENT_EXPORT StreamOptions { |
32 StreamOptions(); | 26 StreamOptions(); |
33 StreamOptions(MediaStreamType audio_type, MediaStreamType video_type); | 27 StreamOptions(MediaStreamType audio_type, MediaStreamType video_type); |
34 | 28 |
35 // If not NO_SERVICE, the stream shall contain an audio input stream. | 29 // If not NO_SERVICE, the stream shall contain an audio input stream. |
36 MediaStreamType audio_type; | 30 MediaStreamType audio_type; |
37 std::string audio_device_id; | 31 std::string audio_device_id; |
(...skipping 26 matching lines...) Expand all Loading... |
64 bool in_use; | 58 bool in_use; |
65 // Id for this capture session. Unique for all sessions of the same type. | 59 // Id for this capture session. Unique for all sessions of the same type. |
66 int session_id; | 60 int session_id; |
67 }; | 61 }; |
68 | 62 |
69 typedef std::vector<StreamDeviceInfo> StreamDeviceInfoArray; | 63 typedef std::vector<StreamDeviceInfo> StreamDeviceInfoArray; |
70 | 64 |
71 } // namespace content | 65 } // namespace content |
72 | 66 |
73 #endif // CONTENT_COMMON_MEDIA_MEDIA_STREAM_OPTIONS_H_ | 67 #endif // CONTENT_COMMON_MEDIA_MEDIA_STREAM_OPTIONS_H_ |
OLD | NEW |