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

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

Issue 9320070: Re-added OnChannelClosing in MediaStreamDispatcherHost to close open media devices. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Indentation after rebase. Created 8 years, 10 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/media_stream_dispatcher_host.cc
diff --git a/content/browser/renderer_host/media/media_stream_dispatcher_host.cc b/content/browser/renderer_host/media/media_stream_dispatcher_host.cc
index 7da5f9193aab4526143b0f0d96424740695e976f..0d3a7b2d1d5d7a873069a2881e35bd07becafae1 100644
--- a/content/browser/renderer_host/media/media_stream_dispatcher_host.cc
+++ b/content/browser/renderer_host/media/media_stream_dispatcher_host.cc
@@ -57,17 +57,15 @@ void MediaStreamDispatcherHost::OnChannelClosing() {
BrowserMessageFilter::OnChannelClosing();
DVLOG(1) << "MediaStreamDispatcherHost::OnChannelClosing";
- // TODO(mflodman) Remove this temporary solution when shut-down issue is
- // resolved, i.e. uncomment the code below.
- // Since the IPC channel is gone, close all requested VideCaptureDevices and
- // cancel pending requests.
-// manager()->CancelRequests(this);
-// for (StreamMap::iterator it = streams_.begin();
-// it != streams_.end();
-// it++) {
-// std::string label = it->first;
-// manager()->StopGeneratedStream(label);
-// }
+ // Since the IPC channel is gone, cancel pending requests and close all
+ // requested VideCaptureDevices.
+ manager()->CancelRequests(this);
+ for (StreamMap::iterator it = streams_.begin();
+ it != streams_.end();
+ it++) {
+ std::string label = it->first;
tommi (sloooow) - chröme 2012/02/23 10:03:22 no need to create an extra string copy. should jus
+ manager()->StopGeneratedStream(label);
+ }
}
void MediaStreamDispatcherHost::OnGenerateStream(

Powered by Google App Engine
This is Rietveld 408576698