Chromium Code Reviews| Index: content/renderer/media/media_stream_dispatcher.cc |
| diff --git a/content/renderer/media/media_stream_dispatcher.cc b/content/renderer/media/media_stream_dispatcher.cc |
| index 2ce2c83aa7c6caa362be84862407bac86d792100..081fd9ed96c1dda2cefdd09fea27839cf6446752 100644 |
| --- a/content/renderer/media/media_stream_dispatcher.cc |
| +++ b/content/renderer/media/media_stream_dispatcher.cc |
| @@ -175,6 +175,16 @@ void MediaStreamDispatcher::OnStreamStarted(const std::string& label) { |
| Send(new MediaStreamHostMsg_StreamStarted(label)); |
| } |
| +void MediaStreamDispatcher::GetVideoCaptureDevices( |
| + StreamDeviceInfoArray& video_array) { |
|
tommi (sloooow) - chröme
2017/03/21 09:21:17
see comment in header for style issue
braveyao
2017/03/22 00:45:32
Done.
|
| + for (const auto& stream_it : label_stream_map_) { |
| + for (const auto& device_it : stream_it.second.video_array) { |
|
tommi (sloooow) - chröme
2017/03/21 09:21:17
|device_it| is misleading, since the variable is n
braveyao
2017/03/22 00:45:32
Done.
|
| + if (device_it.device.type == MEDIA_DEVICE_VIDEO_CAPTURE) |
| + video_array.push_back(device_it); |
| + } |
| + } |
| +} |
| + |
| void MediaStreamDispatcher::OnDestruct() { |
| // Do not self-destruct. UserMediaClientImpl owns |this|. |
| } |