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

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

Issue 8819010: Webcam ppapi flash fix. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years 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 | « no previous file | webkit/plugins/ppapi/ppb_video_capture_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/media/video_capture_controller.cc
===================================================================
--- content/browser/renderer_host/media/video_capture_controller.cc (revision 113138)
+++ content/browser/renderer_host/media/video_capture_controller.cc (working copy)
@@ -222,6 +222,14 @@
client->event_handler->OnReadyToDelete(client->controller_id);
delete client;
controller_clients_.remove(client);
+
+ if (controller_clients_.empty()) {
+ // No more clients. Stop device.
+ video_capture_manager_->Stop(current_params_.session_id,
+ base::Bind(&VideoCaptureController::OnDeviceStopped, this));
+ frame_info_available_ = false;
+ state_ = video_capture::kStopping;
+ }
}
{
base::AutoLock lock(lock_);
« no previous file with comments | « no previous file | webkit/plugins/ppapi/ppb_video_capture_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698