| Index: media/video/video_decode_accelerator.h
|
| diff --git a/media/video/video_decode_accelerator.h b/media/video/video_decode_accelerator.h
|
| index 83d0b95631ca775fdfcb9ec34ef515568481f7dc..63553a9ca2f4a6a75b2dae13d0021412c918aaad 100644
|
| --- a/media/video/video_decode_accelerator.h
|
| +++ b/media/video/video_decode_accelerator.h
|
| @@ -8,6 +8,7 @@
|
| #include <vector>
|
|
|
| #include "base/basictypes.h"
|
| +#include "base/memory/weak_ptr.h"
|
| #include "media/base/bitstream_buffer.h"
|
| #include "media/base/video_decoder_config.h"
|
| #include "media/video/picture.h"
|
| @@ -18,12 +19,11 @@ namespace media {
|
| // Video decoder interface.
|
| // This interface is extended by the various components that ultimately
|
| // implement the backend of PPB_VideoDecode_Dev.
|
| -//
|
| -// No thread-safety guarantees are implied by the use of RefCountedThreadSafe
|
| -// below.
|
| class MEDIA_EXPORT VideoDecodeAccelerator
|
| - : public base::RefCountedThreadSafe<VideoDecodeAccelerator> {
|
| + : public base::SupportsWeakPtr<VideoDecodeAccelerator> {
|
| public:
|
| + virtual ~VideoDecodeAccelerator();
|
| +
|
| // Enumeration of potential errors generated by the API.
|
| // Note: Keep these in sync with PP_VideoDecodeError_Dev.
|
| enum Error {
|
| @@ -126,12 +126,9 @@ class MEDIA_EXPORT VideoDecodeAccelerator
|
| // Destroys the decoder: all pending inputs are dropped immediately and the
|
| // component is freed. This call may asynchornously free system resources,
|
| // but its client-visible effects are synchronous. After this method returns
|
| - // no more callbacks will be made on the client.
|
| + // no more callbacks will be made on the client. Deletes |this|
|
| + // unconditionally, so make sure to drop all pointers to it!
|
| virtual void Destroy() = 0;
|
| -
|
| - protected:
|
| - friend class base::RefCountedThreadSafe<VideoDecodeAccelerator>;
|
| - virtual ~VideoDecodeAccelerator();
|
| };
|
|
|
| } // namespace media
|
|
|