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

Unified Diff: third_party/WebKit/Source/core/frame/LocalFrame.cpp

Issue 2050123002: Remove OwnPtr from Blink. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Merge. 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/core/frame/LocalFrame.cpp
diff --git a/third_party/WebKit/Source/core/frame/LocalFrame.cpp b/third_party/WebKit/Source/core/frame/LocalFrame.cpp
index 68ff6e0e920b56189424e7e442f1b099973e9f43..d2df02bb04a813e465cde43d75ec1ebc7b7cd28a 100644
--- a/third_party/WebKit/Source/core/frame/LocalFrame.cpp
+++ b/third_party/WebKit/Source/core/frame/LocalFrame.cpp
@@ -85,8 +85,9 @@
#include "public/platform/WebScreenInfo.h"
#include "public/platform/WebViewScheduler.h"
#include "third_party/skia/include/core/SkImage.h"
-#include "wtf/PassOwnPtr.h"
+#include "wtf/PtrUtil.h"
#include "wtf/StdLibExtras.h"
+#include <memory>
namespace blink {
@@ -113,7 +114,7 @@ public:
m_bounds.setWidth(m_bounds.width() * deviceScaleFactor);
m_bounds.setHeight(m_bounds.height() * deviceScaleFactor);
- m_pictureBuilder = adoptPtr(new SkPictureBuilder(SkRect::MakeIWH(m_bounds.width(), m_bounds.height())));
+ m_pictureBuilder = wrapUnique(new SkPictureBuilder(SkRect::MakeIWH(m_bounds.width(), m_bounds.height())));
AffineTransform transform;
transform.scale(deviceScaleFactor, deviceScaleFactor);
@@ -123,7 +124,7 @@ public:
GraphicsContext& context() { return m_pictureBuilder->context(); }
- PassOwnPtr<DragImage> createImage()
+ std::unique_ptr<DragImage> createImage()
{
if (m_draggedNode && m_draggedNode->layoutObject())
m_draggedNode->layoutObject()->updateDragState(false);
@@ -146,7 +147,7 @@ private:
Member<Node> m_draggedNode;
FloatRect m_bounds;
float m_opacity;
- OwnPtr<SkPictureBuilder> m_pictureBuilder;
+ std::unique_ptr<SkPictureBuilder> m_pictureBuilder;
};
inline float parentPageZoomFactor(LocalFrame* frame)
@@ -591,7 +592,7 @@ double LocalFrame::devicePixelRatio() const
return ratio;
}
-PassOwnPtr<DragImage> LocalFrame::nodeImage(Node& node)
+std::unique_ptr<DragImage> LocalFrame::nodeImage(Node& node)
{
m_view->updateAllLifecyclePhasesExceptPaint();
LayoutObject* layoutObject = node.layoutObject();
@@ -615,7 +616,7 @@ PassOwnPtr<DragImage> LocalFrame::nodeImage(Node& node)
return dragImageBuilder.createImage();
}
-PassOwnPtr<DragImage> LocalFrame::dragImageForSelection(float opacity)
+std::unique_ptr<DragImage> LocalFrame::dragImageForSelection(float opacity)
{
if (!selection().isRange())
return nullptr;

Powered by Google App Engine
This is Rietveld 408576698