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

Unified Diff: third_party/WebKit/Source/platform/graphics/test/MockImageDecoder.h

Issue 2050123002: Remove OwnPtr from Blink. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: First attempt to land. 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/test/MockImageDecoder.h
diff --git a/third_party/WebKit/Source/platform/graphics/test/MockImageDecoder.h b/third_party/WebKit/Source/platform/graphics/test/MockImageDecoder.h
index a109d96a0d1610eb2011ff7e913f7ef8e2ea7def..f40291e9f883f4392f332f8b441e9956fb63571a 100644
--- a/third_party/WebKit/Source/platform/graphics/test/MockImageDecoder.h
+++ b/third_party/WebKit/Source/platform/graphics/test/MockImageDecoder.h
@@ -26,7 +26,8 @@
#ifndef MockImageDecoder_h
#include "platform/image-decoders/ImageDecoder.h"
-#include "wtf/PassOwnPtr.h"
+#include "wtf/PtrUtil.h"
+#include <memory>
namespace blink {
@@ -65,7 +66,7 @@ private:
class MockImageDecoder : public ImageDecoder {
public:
- static PassOwnPtr<MockImageDecoder> create(MockImageDecoderClient* client) { return adoptPtr(new MockImageDecoder(client)); }
+ static std::unique_ptr<MockImageDecoder> create(MockImageDecoderClient* client) { return wrapUnique(new MockImageDecoder(client)); }
MockImageDecoder(MockImageDecoderClient* client)
: ImageDecoder(AlphaPremultiplied, GammaAndColorProfileApplied, noDecodedImageByteLimit)
@@ -137,19 +138,19 @@ private:
class MockImageDecoderFactory : public ImageDecoderFactory {
public:
- static PassOwnPtr<MockImageDecoderFactory> create(MockImageDecoderClient* client, const SkISize& decodedSize)
+ static std::unique_ptr<MockImageDecoderFactory> create(MockImageDecoderClient* client, const SkISize& decodedSize)
{
- return adoptPtr(new MockImageDecoderFactory(client, IntSize(decodedSize.width(), decodedSize.height())));
+ return wrapUnique(new MockImageDecoderFactory(client, IntSize(decodedSize.width(), decodedSize.height())));
}
- static PassOwnPtr<MockImageDecoderFactory> create(MockImageDecoderClient* client, const IntSize& decodedSize)
+ static std::unique_ptr<MockImageDecoderFactory> create(MockImageDecoderClient* client, const IntSize& decodedSize)
{
- return adoptPtr(new MockImageDecoderFactory(client, decodedSize));
+ return wrapUnique(new MockImageDecoderFactory(client, decodedSize));
}
- PassOwnPtr<ImageDecoder> create() override
+ std::unique_ptr<ImageDecoder> create() override
{
- OwnPtr<MockImageDecoder> decoder = MockImageDecoder::create(m_client);
+ std::unique_ptr<MockImageDecoder> decoder = MockImageDecoder::create(m_client);
decoder->setSize(m_decodedSize.width(), m_decodedSize.height());
return std::move(decoder);
}

Powered by Google App Engine
This is Rietveld 408576698