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

Unified Diff: third_party/WebKit/Source/platform/graphics/RecordingImageBufferSurfaceTest.cpp

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/RecordingImageBufferSurfaceTest.cpp
diff --git a/third_party/WebKit/Source/platform/graphics/RecordingImageBufferSurfaceTest.cpp b/third_party/WebKit/Source/platform/graphics/RecordingImageBufferSurfaceTest.cpp
index c5641e84f198ab029fce5904d7aebbf85295308a..7e9b5702d719e69609a3b7a10201bc172aa2ad2a 100644
--- a/third_party/WebKit/Source/platform/graphics/RecordingImageBufferSurfaceTest.cpp
+++ b/third_party/WebKit/Source/platform/graphics/RecordingImageBufferSurfaceTest.cpp
@@ -17,9 +17,9 @@
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/skia/include/core/SkCanvas.h"
#include "third_party/skia/include/core/SkPictureRecorder.h"
-#include "wtf/PtrUtil.h"
+#include "wtf/OwnPtr.h"
+#include "wtf/PassOwnPtr.h"
#include "wtf/RefPtr.h"
-#include <memory>
using testing::Test;
@@ -78,10 +78,10 @@ class MockSurfaceFactory : public RecordingImageBufferFallbackSurfaceFactory {
public:
MockSurfaceFactory() : m_createSurfaceCount(0) { }
- virtual std::unique_ptr<ImageBufferSurface> createSurface(const IntSize& size, OpacityMode opacityMode)
+ virtual PassOwnPtr<ImageBufferSurface> createSurface(const IntSize& size, OpacityMode opacityMode)
{
m_createSurfaceCount++;
- return wrapUnique(new UnacceleratedImageBufferSurface(size, opacityMode));
+ return adoptPtr(new UnacceleratedImageBufferSurface(size, opacityMode));
}
virtual ~MockSurfaceFactory() { }
@@ -96,15 +96,15 @@ class RecordingImageBufferSurfaceTest : public Test {
protected:
RecordingImageBufferSurfaceTest()
{
- std::unique_ptr<MockSurfaceFactory> surfaceFactory = wrapUnique(new MockSurfaceFactory());
+ OwnPtr<MockSurfaceFactory> surfaceFactory = adoptPtr(new MockSurfaceFactory());
m_surfaceFactory = surfaceFactory.get();
- std::unique_ptr<RecordingImageBufferSurface> testSurface = wrapUnique(new RecordingImageBufferSurface(IntSize(10, 10), std::move(surfaceFactory)));
+ OwnPtr<RecordingImageBufferSurface> testSurface = adoptPtr(new RecordingImageBufferSurface(IntSize(10, 10), std::move(surfaceFactory)));
m_testSurface = testSurface.get();
// We create an ImageBuffer in order for the testSurface to be
// properly initialized with a GraphicsContext
m_imageBuffer = ImageBuffer::create(std::move(testSurface));
EXPECT_FALSE(!m_imageBuffer);
- m_fakeImageBufferClient = wrapUnique(new FakeImageBufferClient(m_imageBuffer.get()));
+ m_fakeImageBufferClient = adoptPtr(new FakeImageBufferClient(m_imageBuffer.get()));
m_imageBuffer->setClient(m_fakeImageBufferClient.get());
}
@@ -226,8 +226,8 @@ public:
private:
MockSurfaceFactory* m_surfaceFactory;
RecordingImageBufferSurface* m_testSurface;
- std::unique_ptr<FakeImageBufferClient> m_fakeImageBufferClient;
- std::unique_ptr<ImageBuffer> m_imageBuffer;
+ OwnPtr<FakeImageBufferClient> m_fakeImageBufferClient;
+ OwnPtr<ImageBuffer> m_imageBuffer;
};
namespace {

Powered by Google App Engine
This is Rietveld 408576698