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

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: 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/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 8c25729a8bc850f2430012ae84c6c13e2d0cce6c..8bb45280b0a1a5d7eaf238bb2a45a8fd875c6659 100644
--- a/third_party/WebKit/Source/core/frame/LocalFrame.cpp
+++ b/third_party/WebKit/Source/core/frame/LocalFrame.cpp
@@ -86,8 +86,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 {
@@ -114,7 +115,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);
@@ -124,7 +125,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);
@@ -148,7 +149,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)
@@ -595,7 +596,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();
@@ -619,7 +620,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;
« no previous file with comments | « third_party/WebKit/Source/core/frame/LocalFrame.h ('k') | third_party/WebKit/Source/core/frame/PageScaleConstraintsSet.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698