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

Unified Diff: content/renderer/media/video_capture_impl.cc

Issue 615043006: Release the camera when WebRTC is not visible in Android (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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/renderer/media/video_capture_impl.cc
diff --git a/content/renderer/media/video_capture_impl.cc b/content/renderer/media/video_capture_impl.cc
index d00fd9db4f5a10d7cec808b2f00bcffdf46d7a98..dfbcc83808b61c81f828d669d39e7a01ad8390c3 100644
--- a/content/renderer/media/video_capture_impl.cc
+++ b/content/renderer/media/video_capture_impl.cc
@@ -73,7 +73,10 @@ void VideoCaptureImpl::DeInit() {
void VideoCaptureImpl::SuspendCapture(bool suspend) {
DCHECK(thread_checker_.CalledOnValidThread());
- suspended_ = suspend;
+ if (suspend)
tommi (sloooow) - chröme 2014/10/01 07:17:03 nit: Send(suspend ? new VideoCaptureHostMsg_P
michaelbai 2014/10/01 22:09:33 Done.
+ Send(new VideoCaptureHostMsg_Pause(device_id_));
+ else
+ Send(new VideoCaptureHostMsg_Resume(device_id_, session_id_, params_));
}
void VideoCaptureImpl::StartCapture(

Powered by Google App Engine
This is Rietveld 408576698