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

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

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: address comments and add a test 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/video_capture_manager.h
diff --git a/content/browser/renderer_host/media/video_capture_manager.h b/content/browser/renderer_host/media/video_capture_manager.h
index 35aee8eba235ef42c49b1fae80e37feb8b17652f..365196a8cecdb71b15b23f83a7ccb56e7db55ac6 100644
--- a/content/browser/renderer_host/media/video_capture_manager.h
+++ b/content/browser/renderer_host/media/video_capture_manager.h
@@ -82,7 +82,8 @@ class CONTENT_EXPORT VideoCaptureManager : public MediaStreamProvider {
// function.
void StopCaptureForClient(VideoCaptureController* controller,
VideoCaptureControllerID client_id,
- VideoCaptureControllerEventHandler* client_handler);
+ VideoCaptureControllerEventHandler* client_handler,
+ bool aborted_due_to_error);
// Retrieves all capture supported formats for a particular device. Returns
// false if the |capture_session_id| is not found. The supported formats are
@@ -145,7 +146,14 @@ class CONTENT_EXPORT VideoCaptureManager : public MediaStreamProvider {
// Find the DeviceEntry that owns a particular controller pointer.
DeviceEntry* GetDeviceEntryForController(
- const VideoCaptureController* controller);
+ const VideoCaptureController* controller) const;
+
+ // Does the same work as StopCaptureForClient but takes DeviceEntry as the
+ // input.
+ void StopCaptureForClientInternal(
perkj_chrome 2014/04/25 14:36:45 This method doesnt seem to exist?
+ DeviceEntry* device_entry,
+ VideoCaptureControllerID client_id,
+ VideoCaptureControllerEventHandler* client_handler);
bool IsOnDeviceThread() const;
@@ -187,11 +195,12 @@ class CONTENT_EXPORT VideoCaptureManager : public MediaStreamProvider {
MediaStreamProviderListener* listener_;
media::VideoCaptureSessionId new_capture_session_id_;
+ typedef std::map<media::VideoCaptureSessionId, MediaStreamDevice> SessionMap;
// An entry is kept in this map for every session that has been created via
// the Open() entry point. The keys are session_id's. This map is used to
// determine which device to use when StartCaptureForClient() occurs. Used
// only on the IO thread.
- std::map<media::VideoCaptureSessionId, MediaStreamDevice> sessions_;
+ SessionMap sessions_;
// An entry, kept in a map, that owns a VideoCaptureDevice and its associated
// VideoCaptureController. VideoCaptureManager owns all VideoCaptureDevices

Powered by Google App Engine
This is Rietveld 408576698