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

Unified Diff: content/renderer/pepper/pepper_plugin_delegate_impl.cc

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 | « content/renderer/media/mock_media_stream_dispatcher.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/pepper/pepper_plugin_delegate_impl.cc
diff --git a/content/renderer/pepper/pepper_plugin_delegate_impl.cc b/content/renderer/pepper/pepper_plugin_delegate_impl.cc
index cfea3d1a956b1546eba2e41b6a537870b9ae97b1..301add46803fd751ac6800b9e4ab2602c559ffa3 100644
--- a/content/renderer/pepper/pepper_plugin_delegate_impl.cc
+++ b/content/renderer/pepper/pepper_plugin_delegate_impl.cc
@@ -1350,7 +1350,7 @@ int PepperPluginDelegateImpl::EnumerateDevices(
#if defined(ENABLE_WEBRTC)
render_view_->media_stream_dispatcher()->EnumerateDevices(
- request_id, device_enumeration_event_handler_.get(),
+ request_id, device_enumeration_event_handler_.get()->AsWeakPtr(),
PepperDeviceEnumerationEventHandler::FromPepperDeviceType(type), "");
#else
MessageLoop::current()->PostTask(
@@ -1538,7 +1538,9 @@ int PepperPluginDelegateImpl::OpenDevice(PP_DeviceType_Dev type,
#if defined(ENABLE_WEBRTC)
render_view_->media_stream_dispatcher()->OpenDevice(
- request_id, device_enumeration_event_handler_.get(), device_id,
+ request_id,
+ device_enumeration_event_handler_.get()->AsWeakPtr(),
+ device_id,
PepperDeviceEnumerationEventHandler::FromPepperDeviceType(type), "");
#else
MessageLoop::current()->PostTask(
« no previous file with comments | « content/renderer/media/mock_media_stream_dispatcher.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698