Chromium Code Reviews| 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 { | |
|
jam
2012/10/12 17:21:41
why is the enum in this struct, it's not used in i
justinlin
2012/10/12 20:04:20
Done. Sounds good to me.
| |
| 67 STATE_NOT_REQUESTED = 0, | |
| 68 STATE_REQUESTED, | |
| 69 STATE_PENDING_APPROVAL, | |
| 70 STATE_OPENING, | |
| 71 STATE_DONE, | |
| 72 STATE_CLOSING, | |
| 73 STATE_ERROR | |
| 74 }; | |
| 75 | |
| 65 MediaStreamRequest( | 76 MediaStreamRequest( |
| 66 int render_process_id, | 77 int render_process_id, |
| 67 int render_view_id, | 78 int render_view_id, |
| 68 const GURL& security_origin); | 79 const GURL& security_origin); |
| 69 | 80 |
| 70 ~MediaStreamRequest(); | 81 ~MediaStreamRequest(); |
| 71 | 82 |
| 72 // The render process id generating this request. | 83 // The render process id generating this request. |
| 73 int render_process_id; | 84 int render_process_id; |
| 74 | 85 |
| 75 // The render view id generating this request. | 86 // The render view id generating this request. |
| 76 int render_view_id; | 87 int render_view_id; |
| 77 | 88 |
| 78 // The WebKit security origin for the current request (e.g. "html5rocks.com"). | 89 // The WebKit security origin for the current request (e.g. "html5rocks.com"). |
| 79 GURL security_origin; | 90 GURL security_origin; |
| 80 | 91 |
| 81 // A list of devices present on the user's computer, for each device type | 92 // A list of devices present on the user's computer, for each device type |
| 82 // requested. | 93 // requested. |
| 83 // All the elements in this map will be deleted in ~MediaStreamRequest(). | 94 // All the elements in this map will be deleted in ~MediaStreamRequest(). |
| 84 MediaStreamDeviceMap devices; | 95 MediaStreamDeviceMap devices; |
| 85 }; | 96 }; |
| 86 | 97 |
| 87 } // namespace content | 98 } // namespace content |
| 88 | 99 |
| 89 #endif // CONTENT_PUBLIC_COMMON_MEDIA_STREAM_REQUEST_H_ | 100 #endif // CONTENT_PUBLIC_COMMON_MEDIA_STREAM_REQUEST_H_ |
| OLD | NEW |