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

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

Issue 248113003: Fix for closing the desktop sharing notification bar when the shared window is closed (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 8 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_manager.cc
diff --git a/content/browser/renderer_host/media/media_stream_manager.cc b/content/browser/renderer_host/media/media_stream_manager.cc
index 944ece580fa5620c5e01e865295840da7567814d..b949886cc01384d9887e8a3bf4c77ecd267b6e68 100644
--- a/content/browser/renderer_host/media/media_stream_manager.cc
+++ b/content/browser/renderer_host/media/media_stream_manager.cc
@@ -48,7 +48,7 @@ namespace content {
class DeviceMonitorMac {
public:
void StartMonitoring(
- const scoped_refptr<base::SingleThreadTaskRunner>& device_task_runner);
+ const scoped_refptr<base::SingleThreadTaskRunner>& device_task_runner);
};
namespace {
@@ -1607,6 +1607,28 @@ void MediaStreamManager::DevicesEnumerated(
DCHECK_GE(active_enumeration_ref_count_[stream_type], 0);
}
+void MediaStreamManager::Aborted(MediaStreamType stream_type,
+ int capture_session_id) {
+ DCHECK_CURRENTLY_ON(BrowserThread::IO);
+ DVLOG(1) << "Aborted({stream_type = " << stream_type << "} "
+ << "{capture_session_id = " << capture_session_id << "})";
+
+ for (DeviceRequests::iterator request_it = requests_.begin();
+ request_it != requests_.end(); ++request_it) {
+ DeviceRequest* request = request_it->second;
+ StreamDeviceInfoArray* devices = &(request->devices);
+
+ for (StreamDeviceInfoArray::iterator device_it = devices->begin();
+ device_it != devices->end(); ++device_it) {
+ if (device_it->device.type == stream_type &&
+ device_it->session_id == capture_session_id) {
+ StopDevice(stream_type, capture_session_id);
+ return;
+ }
+ }
+ }
mcasas 2014/04/24 11:09:47 Is not common in this file, but should we add NOTR
jiayl 2014/04/24 18:11:13 Done.
+}
+
// static
void MediaStreamManager::SendMessageToNativeLog(const std::string& message) {
BrowserThread::PostTask(

Powered by Google App Engine
This is Rietveld 408576698