Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(103)

Unified Diff: content/browser/renderer_host/media/media_stream_manager.cc

Issue 1952463002: Media Stream Image Capture (4): wire takePhoto and implement in FakeVCDevice (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: tommi@ and mlamouri@ comments Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 << "}"

Powered by Google App Engine
This is Rietveld 408576698