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

Unified Diff: third_party/WebKit/Source/platform/mac/ScrollAnimatorMac.mm

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/mac/ScrollAnimatorMac.mm
diff --git a/third_party/WebKit/Source/platform/mac/ScrollAnimatorMac.mm b/third_party/WebKit/Source/platform/mac/ScrollAnimatorMac.mm
index e148eca59fb31776dc78191426efd8296ad1b155..85c5c6dcc4010049eacbe4ba5aeb84306ff028d9 100644
--- a/third_party/WebKit/Source/platform/mac/ScrollAnimatorMac.mm
+++ b/third_party/WebKit/Source/platform/mac/ScrollAnimatorMac.mm
@@ -39,8 +39,7 @@
#include "public/platform/Platform.h"
#include "public/platform/WebScheduler.h"
#include "wtf/MathExtras.h"
-#include "wtf/PtrUtil.h"
-#include <memory>
+#include "wtf/PassOwnPtr.h"
using namespace blink;
@@ -355,7 +354,7 @@ private:
@interface BlinkScrollbarPartAnimation : NSObject {
Scrollbar* _scrollbar;
- std::unique_ptr<BlinkScrollbarPartAnimationTimer> _timer;
+ OwnPtr<BlinkScrollbarPartAnimationTimer> _timer;
RetainPtr<ScrollbarPainter> _scrollbarPainter;
FeatureToAnimate _featureToAnimate;
CGFloat _startValue;
@@ -372,7 +371,7 @@ private:
if (!self)
return nil;
- _timer = wrapUnique(new BlinkScrollbarPartAnimationTimer(self, duration));
+ _timer = adoptPtr(new BlinkScrollbarPartAnimationTimer(self, duration));
_scrollbar = scrollbar;
_featureToAnimate = featureToAnimate;
_startValue = startValue;
@@ -683,7 +682,7 @@ ScrollAnimatorMac::ScrollAnimatorMac(ScrollableArea* scrollableArea)
: ScrollAnimatorBase(scrollableArea)
, m_initialScrollbarPaintTaskFactory(CancellableTaskFactory::create(this, &ScrollAnimatorMac::initialScrollbarPaintTask))
, m_sendContentAreaScrolledTaskFactory(CancellableTaskFactory::create(this, &ScrollAnimatorMac::sendContentAreaScrolledTask))
- , m_taskRunner(wrapUnique(Platform::current()->currentThread()->scheduler()->timerTaskRunner()->clone()))
+ , m_taskRunner(adoptPtr(Platform::current()->currentThread()->scheduler()->timerTaskRunner()->clone()))
, m_haveScrolledSincePageLoad(false)
, m_needsScrollerStyleUpdate(false)
{

Powered by Google App Engine
This is Rietveld 408576698