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

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

Issue 24133002: Make VideoCaptureController single-threaded and not ref counted. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix a memory leak Created 7 years, 3 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_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..aa997f43b8ce37b2b12787d064233bbbb1b9b260 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);
+ base::WeakPtr<VideoCaptureController> controller);
Ami GONE FROM CHROMIUM 2013/09/13 21:17:59 I guess all these base::WeakPtr<VideoCaptureContro
ncarter (slow) 2013/09/14 00:07:24 renamed to handler_as_controller. Just kidding; bu
void DoControllerAddedOnIOThread(
int device_id, const media::VideoCaptureParams params,
- VideoCaptureController* controller);
+ base::WeakPtr<VideoCaptureController> controller);
// IPC message: Stop capture on device referenced by |device_id|.
void OnStopCapture(int device_id);

Powered by Google App Engine
This is Rietveld 408576698