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

Unified Diff: third_party/WebKit/Source/core/input/ScrollManager.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/input/ScrollManager.cpp
diff --git a/third_party/WebKit/Source/core/input/ScrollManager.cpp b/third_party/WebKit/Source/core/input/ScrollManager.cpp
index d5b475c34fd52f8cc325bae80041b754bb44fd06..9d7d5a800ecf5f3ec7dbed669966130da1ee8b9f 100644
--- a/third_party/WebKit/Source/core/input/ScrollManager.cpp
+++ b/third_party/WebKit/Source/core/input/ScrollManager.cpp
@@ -19,6 +19,8 @@
#include "core/page/scrolling/ScrollState.h"
#include "core/paint/PaintLayer.h"
#include "platform/PlatformGestureEvent.h"
+#include "wtf/PtrUtil.h"
+#include <memory>
namespace blink {
@@ -246,7 +248,7 @@ ScrollResult ScrollManager::scrollBox(LayoutBox* box,
// using parts of the scroll customization framework on just this element.
computeScrollChainForSingleNode(*node, m_currentScrollChain);
- OwnPtr<ScrollStateData> scrollStateData = adoptPtr(new ScrollStateData());
+ std::unique_ptr<ScrollStateData> scrollStateData = wrapUnique(new ScrollStateData());
scrollStateData->delta_x = delta.width();
scrollStateData->delta_y = delta.height();
scrollStateData->position_x = position.x();
@@ -326,7 +328,7 @@ WebInputEventResult ScrollManager::handleGestureScrollBegin(const PlatformGestur
passScrollGestureEventToWidget(gestureEvent, m_scrollGestureHandlingNode->layoutObject());
if (RuntimeEnabledFeatures::scrollCustomizationEnabled()) {
m_currentScrollChain.clear();
- OwnPtr<ScrollStateData> scrollStateData = adoptPtr(new ScrollStateData());
+ std::unique_ptr<ScrollStateData> scrollStateData = wrapUnique(new ScrollStateData());
scrollStateData->position_x = gestureEvent.position().x();
scrollStateData->position_y = gestureEvent.position().y();
scrollStateData->is_beginning = true;
@@ -380,7 +382,7 @@ WebInputEventResult ScrollManager::handleGestureScrollUpdate(const PlatformGestu
}
if (handleScrollCustomization) {
- OwnPtr<ScrollStateData> scrollStateData = adoptPtr(new ScrollStateData());
+ std::unique_ptr<ScrollStateData> scrollStateData = wrapUnique(new ScrollStateData());
scrollStateData->delta_x = delta.width();
scrollStateData->delta_y = delta.height();
scrollStateData->delta_granularity = ScrollByPrecisePixel;
@@ -445,7 +447,7 @@ WebInputEventResult ScrollManager::handleGestureScrollEnd(const PlatformGestureE
if (node) {
passScrollGestureEventToWidget(gestureEvent, node->layoutObject());
if (RuntimeEnabledFeatures::scrollCustomizationEnabled()) {
- OwnPtr<ScrollStateData> scrollStateData = adoptPtr(new ScrollStateData());
+ std::unique_ptr<ScrollStateData> scrollStateData = wrapUnique(new ScrollStateData());
scrollStateData->is_ending = true;
scrollStateData->is_in_inertial_phase = gestureEvent.inertialPhase() == ScrollInertialPhaseMomentum;
scrollStateData->from_user_input = true;
« no previous file with comments | « third_party/WebKit/Source/core/input/EventHandlerTest.cpp ('k') | third_party/WebKit/Source/core/input/TouchEventManager.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698