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

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

Issue 2365223002: Video Capture: Allow suspension of individual devices. (Closed)
Patch Set: REBASE, and clean-ups+tests suggested by chfremer@. Created 4 years, 3 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/video_capture_host.cc
diff --git a/content/browser/renderer_host/media/video_capture_host.cc b/content/browser/renderer_host/media/video_capture_host.cc
index 20e34a2d6785773fb6af5650548d3e13af479a37..e435cc57153d4ccbb6610f7638b291c51779b88a 100644
--- a/content/browser/renderer_host/media/video_capture_host.cc
+++ b/content/browser/renderer_host/media/video_capture_host.cc
@@ -243,6 +243,8 @@ void VideoCaptureHost::OnPauseCapture(int device_id) {
if (it->second) {
mcasas 2016/09/28 21:34:43 prefer early return? if (!it->second) return; //
miu 2016/09/28 22:35:15 Done.
media_stream_manager_->video_capture_manager()->PauseCaptureForClient(
it->second.get(), controller_id, this);
+ Send(new VideoCaptureMsg_StateChanged(device_id,
+ VIDEO_CAPTURE_STATE_PAUSED));
}
}
@@ -261,6 +263,8 @@ void VideoCaptureHost::OnResumeCapture(
if (it->second) {
media_stream_manager_->video_capture_manager()->ResumeCaptureForClient(
session_id, params, it->second.get(), controller_id, this);
+ Send(new VideoCaptureMsg_StateChanged(device_id,
+ VIDEO_CAPTURE_STATE_RESUMED));
}
}

Powered by Google App Engine
This is Rietveld 408576698