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

Unified Diff: third_party/WebKit/Source/platform/scroll/ScrollAnimator.cpp

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/scroll/ScrollAnimator.cpp
diff --git a/third_party/WebKit/Source/platform/scroll/ScrollAnimator.cpp b/third_party/WebKit/Source/platform/scroll/ScrollAnimator.cpp
index 1f24fca4ce78ee500c163adfd50963bd42e307fe..da905db40ea118d8f656466bc4d030dca3a00ece 100644
--- a/third_party/WebKit/Source/platform/scroll/ScrollAnimator.cpp
+++ b/third_party/WebKit/Source/platform/scroll/ScrollAnimator.cpp
@@ -41,6 +41,8 @@
#include "public/platform/WebCompositorSupport.h"
#include "wtf/CurrentTime.h"
#include "wtf/PassRefPtr.h"
+#include "wtf/PtrUtil.h"
+#include <memory>
namespace blink {
@@ -268,7 +270,7 @@ bool ScrollAnimator::sendAnimationToCompositor()
if (m_scrollableArea->shouldScrollOnMainThread())
return false;
- OwnPtr<CompositorAnimation> animation = adoptPtr(
+ std::unique_ptr<CompositorAnimation> animation = wrapUnique(
CompositorFactory::current().createAnimation(
*m_animationCurve,
CompositorTargetProperty::SCROLL_OFFSET));
@@ -296,7 +298,7 @@ bool ScrollAnimator::sendAnimationToCompositor()
void ScrollAnimator::createAnimationCurve()
{
DCHECK(!m_animationCurve);
- m_animationCurve = adoptPtr(CompositorFactory::current().createScrollOffsetAnimationCurve(
+ m_animationCurve = wrapUnique(CompositorFactory::current().createScrollOffsetAnimationCurve(
compositorOffsetFromBlinkOffset(m_targetOffset),
m_lastGranularity == ScrollByPixel ?
CompositorScrollOffsetAnimationCurve::ScrollDurationInverseDelta :
@@ -425,7 +427,7 @@ void ScrollAnimator::notifyAnimationTakeover(
FloatPoint targetValue(scrollOffsetAnimationCurve->target_value().x(),
scrollOffsetAnimationCurve->target_value().y());
if (willAnimateToOffset(targetValue)) {
- m_animationCurve = adoptPtr(
+ m_animationCurve = wrapUnique(
CompositorFactory::current().createScrollOffsetAnimationCurve(
std::move(scrollOffsetAnimationCurve)));
m_startTime = animationStartTime;

Powered by Google App Engine
This is Rietveld 408576698