| Index: content/browser/renderer_host/media/media_stream_manager.cc
|
| diff --git a/content/browser/renderer_host/media/media_stream_manager.cc b/content/browser/renderer_host/media/media_stream_manager.cc
|
| index e8c23abce0aa7e5a1a4d2480de8e5c991a1ac471..8bd1bc4bc13eb92f0a812d4d39aae7c0c4415592 100644
|
| --- a/content/browser/renderer_host/media/media_stream_manager.cc
|
| +++ b/content/browser/renderer_host/media/media_stream_manager.cc
|
| @@ -597,6 +597,21 @@ void MediaStreamManager::StopStreamDevice(int render_process_id,
|
| }
|
| }
|
|
|
| +int MediaStreamManager::VideoDeviceIdToSessionId(
|
| + const std::string& device_id) const {
|
| + DCHECK_CURRENTLY_ON(BrowserThread::IO);
|
| +
|
| + for (const LabeledDeviceRequest& device_request : requests_) {
|
| + for (const StreamDeviceInfo& info : device_request.second->devices) {
|
| + if (info.device.id == device_id) {
|
| + DCHECK_EQ(MEDIA_DEVICE_VIDEO_CAPTURE, info.device.type);
|
| + return info.session_id;
|
| + }
|
| + }
|
| + }
|
| + return StreamDeviceInfo::kNoId;
|
| +}
|
| +
|
| void MediaStreamManager::StopDevice(MediaStreamType type, int session_id) {
|
| DVLOG(1) << "StopDevice"
|
| << "{type = " << type << "}"
|
|
|