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

Unified Diff: third_party/WebKit/Source/core/page/scrolling/ScrollingCoordinator.cpp

Issue 2389973002: Use std::unique_ptr to signal ownership transfer in WebCompositorSupport (Closed)
Patch Set: rebase Created 4 years, 2 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/page/scrolling/ScrollingCoordinator.cpp
diff --git a/third_party/WebKit/Source/core/page/scrolling/ScrollingCoordinator.cpp b/third_party/WebKit/Source/core/page/scrolling/ScrollingCoordinator.cpp
index 25ba128fe5d0422417ce1dda6a2e268797f46263..d8c6599e5cca8f50180a4cc7c1d0ef73cc436162 100644
--- a/third_party/WebKit/Source/core/page/scrolling/ScrollingCoordinator.cpp
+++ b/third_party/WebKit/Source/core/page/scrolling/ScrollingCoordinator.cpp
@@ -64,9 +64,9 @@
#include "public/platform/WebScrollbarLayer.h"
#include "public/platform/WebScrollbarThemeGeometry.h"
#include "public/platform/WebScrollbarThemePainter.h"
-#include "wtf/PtrUtil.h"
#include "wtf/text/StringBuilder.h"
#include <memory>
+#include <utility>
using blink::WebLayer;
using blink::WebLayerPositionConstraint;
@@ -309,8 +309,8 @@ static std::unique_ptr<WebScrollbarLayer> createScrollbarLayer(
WebScrollbarThemeGeometryNative::create(theme));
std::unique_ptr<WebScrollbarLayer> scrollbarLayer =
- wrapUnique(Platform::current()->compositorSupport()->createScrollbarLayer(
- WebScrollbarImpl::create(&scrollbar), painter, geometry.release()));
+ Platform::current()->compositorSupport()->createScrollbarLayer(
+ WebScrollbarImpl::create(&scrollbar), painter, std::move(geometry));
GraphicsLayer::registerContentsLayer(scrollbarLayer->layer());
return scrollbarLayer;
}
@@ -324,10 +324,10 @@ ScrollingCoordinator::createSolidColorScrollbarLayer(
WebScrollbar::Orientation webOrientation =
(orientation == HorizontalScrollbar) ? WebScrollbar::Horizontal
: WebScrollbar::Vertical;
- std::unique_ptr<WebScrollbarLayer> scrollbarLayer = wrapUnique(
+ std::unique_ptr<WebScrollbarLayer> scrollbarLayer =
Platform::current()->compositorSupport()->createSolidColorScrollbarLayer(
webOrientation, thumbThickness, trackStart,
- isLeftSideVerticalScrollbar));
+ isLeftSideVerticalScrollbar);
GraphicsLayer::registerContentsLayer(scrollbarLayer->layer());
return scrollbarLayer;
}

Powered by Google App Engine
This is Rietveld 408576698