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

Unified Diff: third_party/WebKit/Source/platform/graphics/DeferredImageDecoder.h

Issue 2080623002: Revert "Remove OwnPtr from Blink." (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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
Index: third_party/WebKit/Source/platform/graphics/DeferredImageDecoder.h
diff --git a/third_party/WebKit/Source/platform/graphics/DeferredImageDecoder.h b/third_party/WebKit/Source/platform/graphics/DeferredImageDecoder.h
index 3db9411945014f97371cdcf03a006332439f4c30..4838182b349908322925d7b26cf1a22c84633d36 100644
--- a/third_party/WebKit/Source/platform/graphics/DeferredImageDecoder.h
+++ b/third_party/WebKit/Source/platform/graphics/DeferredImageDecoder.h
@@ -32,8 +32,8 @@
#include "third_party/skia/include/core/SkRWBuffer.h"
#include "wtf/Allocator.h"
#include "wtf/Forward.h"
+#include "wtf/OwnPtr.h"
#include "wtf/Vector.h"
-#include <memory>
class SkImage;
@@ -47,9 +47,9 @@ class PLATFORM_EXPORT DeferredImageDecoder final {
WTF_MAKE_NONCOPYABLE(DeferredImageDecoder);
USING_FAST_MALLOC(DeferredImageDecoder);
public:
- static std::unique_ptr<DeferredImageDecoder> create(const SharedBuffer& data, ImageDecoder::AlphaOption, ImageDecoder::GammaAndColorProfileOption);
+ static PassOwnPtr<DeferredImageDecoder> create(const SharedBuffer& data, ImageDecoder::AlphaOption, ImageDecoder::GammaAndColorProfileOption);
- static std::unique_ptr<DeferredImageDecoder> createForTesting(std::unique_ptr<ImageDecoder>);
+ static PassOwnPtr<DeferredImageDecoder> createForTesting(PassOwnPtr<ImageDecoder>);
~DeferredImageDecoder();
@@ -74,7 +74,7 @@ public:
bool hotSpot(IntPoint&) const;
private:
- explicit DeferredImageDecoder(std::unique_ptr<ImageDecoder> actualDecoder);
+ explicit DeferredImageDecoder(PassOwnPtr<ImageDecoder> actualDecoder);
friend class DeferredImageDecoderTest;
ImageFrameGenerator* frameGenerator() { return m_frameGenerator.get(); }
@@ -86,9 +86,9 @@ private:
// Copy of the data that is passed in, used by deferred decoding.
// Allows creating readonly snapshots that may be read in another thread.
- std::unique_ptr<SkRWBuffer> m_rwBuffer;
+ OwnPtr<SkRWBuffer> m_rwBuffer;
bool m_allDataReceived;
- std::unique_ptr<ImageDecoder> m_actualDecoder;
+ OwnPtr<ImageDecoder> m_actualDecoder;
String m_filenameExtension;
IntSize m_size;

Powered by Google App Engine
This is Rietveld 408576698