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

Unified Diff: content/browser/renderer_host/media/media_stream_device_settings.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_device_settings.cc
diff --git a/content/browser/renderer_host/media/media_stream_device_settings.cc b/content/browser/renderer_host/media/media_stream_device_settings.cc
index 78b895d15007798b9ef502f2075eee82e3b91641..39d66e7a5b2693abfd124a9638a65eb6eed3e67f 100644
--- a/content/browser/renderer_host/media/media_stream_device_settings.cc
+++ b/content/browser/renderer_host/media/media_stream_device_settings.cc
@@ -134,6 +134,18 @@ void MediaStreamDeviceSettings::RequestCaptureDeviceUsage(
render_process_id, render_view_id, security_origin, request_options)));
}
+void MediaStreamDeviceSettings::RemovePendingCaptureRequest(
+ const std::string& label) {
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
+
+ SettingsRequests::iterator request_it = requests_.find(label);
+ if (request_it != requests_.end()) {
+ MediaStreamDeviceSettingsRequest* request = request_it->second;
+ requests_.erase(request_it);
+ delete request;
+ }
+}
+
void MediaStreamDeviceSettings::AvailableDevices(
const std::string& label,
MediaStreamType stream_type,

Powered by Google App Engine
This is Rietveld 408576698