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

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: sync Created 6 years, 2 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
« no previous file with comments | « content/common/media/video_capture_messages.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..9688b464680fb8271cbec4a7882ef16391324f5d 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;
+ Send(suspend ?
+ static_cast<IPC::Message*>(new VideoCaptureHostMsg_Pause(device_id_)) :
+ static_cast<IPC::Message*>(
+ new VideoCaptureHostMsg_Resume(device_id_, session_id_, params_)));
}
void VideoCaptureImpl::StartCapture(
« no previous file with comments | « content/common/media/video_capture_messages.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698