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

Unified Diff: content/renderer/media/media_stream_dispatcher.h

Issue 9903014: Using WeakPtr for requests to MediaStreamDispatcher. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 8 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
« no previous file with comments | « no previous file | content/renderer/media/media_stream_dispatcher.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/media/media_stream_dispatcher.h
diff --git a/content/renderer/media/media_stream_dispatcher.h b/content/renderer/media/media_stream_dispatcher.h
index 72dd02b50561b277ee04675313f045e2970c2e35..33bc954796e238d4ab3226fa4183c0796a561780 100644
--- a/content/renderer/media/media_stream_dispatcher.h
+++ b/content/renderer/media/media_stream_dispatcher.h
@@ -34,7 +34,7 @@ class CONTENT_EXPORT MediaStreamDispatcher
// Note: The event_handler must be valid for as long as the stream exists.
virtual void GenerateStream(
int request_id,
- MediaStreamDispatcherEventHandler* event_handler,
+ const base::WeakPtr<MediaStreamDispatcherEventHandler>& event_handler,
media_stream::StreamOptions components,
const std::string& security_origin);
@@ -42,17 +42,19 @@ class CONTENT_EXPORT MediaStreamDispatcher
virtual void StopStream(const std::string& label);
// Request to enumerate devices.
- void EnumerateDevices(int request_id,
- MediaStreamDispatcherEventHandler* event_handler,
- media_stream::MediaStreamType type,
- const std::string& security_origin);
+ void EnumerateDevices(
+ int request_id,
+ const base::WeakPtr<MediaStreamDispatcherEventHandler>& event_handler,
+ media_stream::MediaStreamType type,
+ const std::string& security_origin);
// Request to open a device.
- void OpenDevice(int request_id,
- MediaStreamDispatcherEventHandler* event_handler,
- const std::string& device_id,
- media_stream::MediaStreamType type,
- const std::string& security_origin);
+ void OpenDevice(
+ int request_id,
+ const base::WeakPtr<MediaStreamDispatcherEventHandler>& event_handler,
+ const std::string& device_id,
+ media_stream::MediaStreamType type,
+ const std::string& security_origin);
// Close a started device. |label| is provided in OnDeviceOpened.
void CloseDevice(const std::string& label);
« no previous file with comments | « no previous file | content/renderer/media/media_stream_dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698