Chromium Code Reviews| Index: content/browser/renderer_host/media/video_capture_host.h |
| diff --git a/content/browser/renderer_host/media/video_capture_host.h b/content/browser/renderer_host/media/video_capture_host.h |
| index d835b6cb3183c77e4ab67395c9b59dc1f35c77a1..b763588686fc3045f1a4921695a023fb22707c42 100644 |
| --- a/content/browser/renderer_host/media/video_capture_host.h |
| +++ b/content/browser/renderer_host/media/video_capture_host.h |
| @@ -39,6 +39,7 @@ |
| #include <map> |
| #include "base/memory/ref_counted.h" |
| +#include "base/memory/weak_ptr.h" |
| #include "base/sequenced_task_runner_helpers.h" |
| #include "content/browser/renderer_host/media/video_capture_controller.h" |
| #include "content/common/content_export.h" |
| @@ -97,10 +98,10 @@ class CONTENT_EXPORT VideoCaptureHost |
| const media::VideoCaptureParams& params); |
| void OnControllerAdded( |
| int device_id, const media::VideoCaptureParams& params, |
| - VideoCaptureController* controller); |
| + const base::WeakPtr<VideoCaptureController>& controller); |
| void DoControllerAddedOnIOThread( |
| int device_id, const media::VideoCaptureParams params, |
| - VideoCaptureController* controller); |
| + const base::WeakPtr<VideoCaptureController>& controller); |
| // IPC message: Stop capture on device referenced by |device_id|. |
| void OnStopCapture(int device_id); |
| @@ -148,9 +149,12 @@ class CONTENT_EXPORT VideoCaptureHost |
| MediaStreamManager* media_stream_manager_; |
| - struct Entry; |
| - typedef std::map<VideoCaptureControllerID, Entry*> EntryMap; |
| - // A map of VideoCaptureControllerID to its state and VideoCaptureController. |
| + typedef std::map<VideoCaptureControllerID, |
| + base::WeakPtr<VideoCaptureController> > EntryMap; |
| + |
| + // A map of VideoCaptureControllerID to the VideoCaptureController to which |
| + // it is connected. An entry in this map temporarily has holds a null |
|
Ami GONE FROM CHROMIUM
2013/09/14 00:32:24
has holds
ncarter (slow)
2013/09/14 01:29:31
Done.
|
| + // controller while it is in the process of starting. |
| EntryMap entries_; |
| DISALLOW_COPY_AND_ASSIGN(VideoCaptureHost); |