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

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

Issue 8480028: support video device enumeration from renderer process. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: simplify interface between MSManager and MSDevieSettings Created 9 years, 1 month 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_manager.cc
===================================================================
--- content/browser/renderer_host/media/video_capture_manager.cc (revision 109718)
+++ content/browser/renderer_host/media/video_capture_manager.cc (working copy)
@@ -4,6 +4,8 @@
#include "content/browser/renderer_host/media/video_capture_manager.h"
+#include <set>
+
#include "base/bind.h"
#include "base/stl_util.h"
#include "content/browser/renderer_host/media/video_capture_controller.h"
@@ -51,12 +53,14 @@
// Temporary solution: close all open devices and delete them, after the
// thread is stopped.
DLOG_IF(ERROR, !devices_.empty()) << "VideoCaptureManager: Open devices!";
+ std::set<media::VideoCaptureDevice*> devices_to_delete;
for (VideoCaptureDevices::iterator it = devices_.begin();
it != devices_.end();
++it) {
it->second->DeAllocate();
- delete it->second;
+ devices_to_delete.insert(it->second);
}
+ STLDeleteElements(&devices_to_delete);
STLDeleteValues(&controllers_);
}
« no previous file with comments | « content/browser/renderer_host/media/media_stream_settings_requester.h ('k') | content/common/media/media_stream_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698