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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 std::string name; | 55 std::string name; |
56 }; | 56 }; |
57 | 57 |
58 typedef std::vector<MediaStreamDevice> MediaStreamDevices; | 58 typedef std::vector<MediaStreamDevice> MediaStreamDevices; |
59 | 59 |
60 typedef std::map<MediaStreamDeviceType, MediaStreamDevices> | 60 typedef std::map<MediaStreamDeviceType, MediaStreamDevices> |
61 MediaStreamDeviceMap; | 61 MediaStreamDeviceMap; |
62 | 62 |
63 // Represents a request for media streams (audio/video). | 63 // Represents a request for media streams (audio/video). |
64 struct CONTENT_EXPORT MediaStreamRequest { | 64 struct CONTENT_EXPORT MediaStreamRequest { |
| 65 |
| 66 enum RequestState { |
| 67 STATE_NOT_REQUESTED = 0, |
| 68 STATE_REQUESTED, |
| 69 STATE_PENDING_APPROVAL, |
| 70 STATE_OPENING, |
| 71 STATE_DONE, |
| 72 STATE_ERROR |
| 73 }; |
| 74 |
65 MediaStreamRequest( | 75 MediaStreamRequest( |
66 int render_process_id, | 76 int render_process_id, |
67 int render_view_id, | 77 int render_view_id, |
68 const GURL& security_origin); | 78 const GURL& security_origin); |
69 | 79 |
70 ~MediaStreamRequest(); | 80 ~MediaStreamRequest(); |
71 | 81 |
72 // The render process id generating this request. | 82 // The render process id generating this request. |
73 int render_process_id; | 83 int render_process_id; |
74 | 84 |
75 // The render view id generating this request. | 85 // The render view id generating this request. |
76 int render_view_id; | 86 int render_view_id; |
77 | 87 |
78 // The WebKit security origin for the current request (e.g. "html5rocks.com"). | 88 // The WebKit security origin for the current request (e.g. "html5rocks.com"). |
79 GURL security_origin; | 89 GURL security_origin; |
80 | 90 |
81 // A list of devices present on the user's computer, for each device type | 91 // A list of devices present on the user's computer, for each device type |
82 // requested. | 92 // requested. |
83 // All the elements in this map will be deleted in ~MediaStreamRequest(). | 93 // All the elements in this map will be deleted in ~MediaStreamRequest(). |
84 MediaStreamDeviceMap devices; | 94 MediaStreamDeviceMap devices; |
85 }; | 95 }; |
86 | 96 |
87 } // namespace content | 97 } // namespace content |
88 | 98 |
89 #endif // CONTENT_PUBLIC_COMMON_MEDIA_STREAM_REQUEST_H_ | 99 #endif // CONTENT_PUBLIC_COMMON_MEDIA_STREAM_REQUEST_H_ |
OLD | NEW |