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

Unified Diff: third_party/WebKit/Source/platform/fonts/SimpleFontData.h

Issue 2050123002: Remove OwnPtr from Blink. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments from Kent; 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/platform/fonts/SimpleFontData.h
diff --git a/third_party/WebKit/Source/platform/fonts/SimpleFontData.h b/third_party/WebKit/Source/platform/fonts/SimpleFontData.h
index 54bed93e609a25618f6b20410a59cf214b3fa188..d6696cca850820889987b25e1abecbd29cb35d78 100644
--- a/third_party/WebKit/Source/platform/fonts/SimpleFontData.h
+++ b/third_party/WebKit/Source/platform/fonts/SimpleFontData.h
@@ -35,9 +35,9 @@
#include "platform/fonts/TypesettingFeatures.h"
#include "platform/fonts/opentype/OpenTypeVerticalData.h"
#include "platform/geometry/FloatRect.h"
-#include "wtf/OwnPtr.h"
-#include "wtf/PassOwnPtr.h"
+#include "wtf/PtrUtil.h"
#include "wtf/text/StringHash.h"
+#include <memory>
namespace blink {
@@ -144,7 +144,7 @@ private:
FontPlatformData m_platformData;
- mutable OwnPtr<GlyphMetricsMap<FloatRect>> m_glyphToBoundsMap;
+ mutable std::unique_ptr<GlyphMetricsMap<FloatRect>> m_glyphToBoundsMap;
mutable GlyphMetricsMap<float> m_glyphToWidthMap;
bool m_isTextOrientationFallback;
@@ -161,7 +161,7 @@ private:
USING_FAST_MALLOC(DerivedFontData);
WTF_MAKE_NONCOPYABLE(DerivedFontData);
public:
- static PassOwnPtr<DerivedFontData> create(bool forCustomFont);
+ static std::unique_ptr<DerivedFontData> create(bool forCustomFont);
~DerivedFontData();
bool forCustomFont;
@@ -177,7 +177,7 @@ private:
}
};
- mutable OwnPtr<DerivedFontData> m_derivedFontData;
+ mutable std::unique_ptr<DerivedFontData> m_derivedFontData;
RefPtr<CustomFontData> m_customFontData;
};
@@ -193,7 +193,7 @@ ALWAYS_INLINE FloatRect SimpleFontData::boundsForGlyph(Glyph glyph) const
bounds = platformBoundsForGlyph(glyph);
if (!m_glyphToBoundsMap)
- m_glyphToBoundsMap = adoptPtr(new GlyphMetricsMap<FloatRect>);
+ m_glyphToBoundsMap = wrapUnique(new GlyphMetricsMap<FloatRect>);
m_glyphToBoundsMap->setMetricsForGlyph(glyph, bounds);
return bounds;
}

Powered by Google App Engine
This is Rietveld 408576698