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

Unified Diff: third_party/WebKit/Source/platform/graphics/test/MockImageDecoder.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/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 f40291e9f883f4392f332f8b441e9956fb63571a..a109d96a0d1610eb2011ff7e913f7ef8e2ea7def 100644
--- a/third_party/WebKit/Source/platform/graphics/test/MockImageDecoder.h
+++ b/third_party/WebKit/Source/platform/graphics/test/MockImageDecoder.h
@@ -26,8 +26,7 @@
#ifndef MockImageDecoder_h
#include "platform/image-decoders/ImageDecoder.h"
-#include "wtf/PtrUtil.h"
-#include <memory>
+#include "wtf/PassOwnPtr.h"
namespace blink {
@@ -66,7 +65,7 @@ private:
class MockImageDecoder : public ImageDecoder {
public:
- static std::unique_ptr<MockImageDecoder> create(MockImageDecoderClient* client) { return wrapUnique(new MockImageDecoder(client)); }
+ static PassOwnPtr<MockImageDecoder> create(MockImageDecoderClient* client) { return adoptPtr(new MockImageDecoder(client)); }
MockImageDecoder(MockImageDecoderClient* client)
: ImageDecoder(AlphaPremultiplied, GammaAndColorProfileApplied, noDecodedImageByteLimit)
@@ -138,19 +137,19 @@ private:
class MockImageDecoderFactory : public ImageDecoderFactory {
public:
- static std::unique_ptr<MockImageDecoderFactory> create(MockImageDecoderClient* client, const SkISize& decodedSize)
+ static PassOwnPtr<MockImageDecoderFactory> create(MockImageDecoderClient* client, const SkISize& decodedSize)
{
- return wrapUnique(new MockImageDecoderFactory(client, IntSize(decodedSize.width(), decodedSize.height())));
+ return adoptPtr(new MockImageDecoderFactory(client, IntSize(decodedSize.width(), decodedSize.height())));
}
- static std::unique_ptr<MockImageDecoderFactory> create(MockImageDecoderClient* client, const IntSize& decodedSize)
+ static PassOwnPtr<MockImageDecoderFactory> create(MockImageDecoderClient* client, const IntSize& decodedSize)
{
- return wrapUnique(new MockImageDecoderFactory(client, decodedSize));
+ return adoptPtr(new MockImageDecoderFactory(client, decodedSize));
}
- std::unique_ptr<ImageDecoder> create() override
+ PassOwnPtr<ImageDecoder> create() override
{
- std::unique_ptr<MockImageDecoder> decoder = MockImageDecoder::create(m_client);
+ OwnPtr<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