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

Unified Diff: content/renderer/pepper/pepper_device_enumeration_host_helper.h

Issue 653243003: Pepper: Access PepperMediaDeviceManager through a WeakPtr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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/pepper/pepper_device_enumeration_host_helper.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/pepper/pepper_device_enumeration_host_helper.h
diff --git a/content/renderer/pepper/pepper_device_enumeration_host_helper.h b/content/renderer/pepper/pepper_device_enumeration_host_helper.h
index 088d4661c0ecb36d8254c76d54079546545aff8a..ea1a7fcb97558d79653200be5a2f9f93d48ab6ff 100644
--- a/content/renderer/pepper/pepper_device_enumeration_host_helper.h
+++ b/content/renderer/pepper/pepper_device_enumeration_host_helper.h
@@ -10,6 +10,7 @@
#include "base/basictypes.h"
#include "base/callback_forward.h"
#include "base/memory/scoped_ptr.h"
+#include "base/memory/weak_ptr.h"
#include "content/common/content_export.h"
#include "ppapi/c/dev/ppb_device_ref_dev.h"
#include "ppapi/host/host_message_context.h"
@@ -58,7 +59,7 @@ class CONTENT_EXPORT PepperDeviceEnumerationHostHelper {
// |resource_host| and |delegate| must outlive this object.
PepperDeviceEnumerationHostHelper(ppapi::host::ResourceHost* resource_host,
- Delegate* delegate,
+ base::WeakPtr<Delegate> delegate,
PP_DeviceType_Dev device_type,
const GURL& document_url);
~PepperDeviceEnumerationHostHelper();
@@ -93,7 +94,7 @@ class CONTENT_EXPORT PepperDeviceEnumerationHostHelper {
// Non-owning pointers.
ppapi::host::ResourceHost* resource_host_;
- Delegate* delegate_;
+ base::WeakPtr<Delegate> delegate_;
PP_DeviceType_Dev device_type_;
GURL document_url_;
« no previous file with comments | « no previous file | content/renderer/pepper/pepper_device_enumeration_host_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698