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

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

Issue 10534004: Implement CancelUserMediaRequest for the browser part (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: addressed tommi's comments Created 8 years, 6 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 96eeb256c9fd05be6cf1c7d0b387b227f6ac4c8f..fd980c524dedf5283dea9edc7813c96339fe6ba4 100644
--- a/content/browser/renderer_host/media/media_stream_dispatcher_host.cc
+++ b/content/browser/renderer_host/media/media_stream_dispatcher_host.cc
@@ -214,8 +214,13 @@ void MediaStreamDispatcherHost::OnCancelGenerateStream(int render_view_id,
DVLOG(1) << "MediaStreamDispatcherHost::OnCancelGenerateStream("
<< render_view_id << ", "
<< page_request_id << ")";
- // TODO(perkj): Implement
- NOTIMPLEMENTED();
+
+ for (StreamMap::iterator it = streams_.begin(); it != streams_.end(); ++it) {
+ if (it->second.render_view_id == render_view_id &&
+ it->second.page_request_id == page_request_id) {
+ manager()->CancelGenerateStream(it->first);
+ }
+ }
}
void MediaStreamDispatcherHost::OnStopGeneratedStream(

Powered by Google App Engine
This is Rietveld 408576698