Index: media/filters/vpx_video_decoder.h |
diff --git a/media/filters/vpx_video_decoder.h b/media/filters/vpx_video_decoder.h |
index 77578fdc90f7e6c82de90090cadff43857e1a886..aea47bb1455cf81c6b57bb91d57352880bf2fc16 100644 |
--- a/media/filters/vpx_video_decoder.h |
+++ b/media/filters/vpx_video_decoder.h |
@@ -6,7 +6,7 @@ |
#define MEDIA_FILTERS_VPX_VIDEO_DECODER_H_ |
#include "base/callback.h" |
-#include "base/memory/ref_counted.h" |
+#include "base/memory/weak_ptr.h" |
#include "media/base/demuxer_stream.h" |
#include "media/base/video_decoder.h" |
@@ -23,6 +23,7 @@ class MEDIA_EXPORT VpxVideoDecoder : public VideoDecoder { |
public: |
explicit VpxVideoDecoder( |
const scoped_refptr<base::MessageLoopProxy>& message_loop); |
+ virtual ~VpxVideoDecoder(); |
// VideoDecoder implementation. |
virtual void Initialize(const scoped_refptr<DemuxerStream>& stream, |
@@ -32,9 +33,6 @@ class MEDIA_EXPORT VpxVideoDecoder : public VideoDecoder { |
virtual void Reset(const base::Closure& closure) OVERRIDE; |
virtual void Stop(const base::Closure& closure) OVERRIDE; |
- protected: |
- virtual ~VpxVideoDecoder(); |
- |
private: |
enum DecoderState { |
kUninitialized, |
@@ -66,6 +64,8 @@ class MEDIA_EXPORT VpxVideoDecoder : public VideoDecoder { |
scoped_refptr<VideoFrame>* video_frame); |
scoped_refptr<base::MessageLoopProxy> message_loop_; |
+ base::WeakPtrFactory<VpxVideoDecoder> weak_factory_; |
+ base::WeakPtr<VpxVideoDecoder> weak_this_; |
DecoderState state_; |