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

Unified Diff: cc/blink/web_scrollbar_layer_impl.cc

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: cc/blink/web_scrollbar_layer_impl.cc
diff --git a/cc/blink/web_scrollbar_layer_impl.cc b/cc/blink/web_scrollbar_layer_impl.cc
index 7011d5fc91ef5f7f115f15b152b3feac2db34542..b9c6df38b6c1db6a7e1feb25c181e288e9a02a64 100644
--- a/cc/blink/web_scrollbar_layer_impl.cc
+++ b/cc/blink/web_scrollbar_layer_impl.cc
@@ -4,6 +4,8 @@
#include "cc/blink/web_scrollbar_layer_impl.h"
+#include <utility>
+
#include "base/memory/ptr_util.h"
#include "cc/blink/scrollbar_impl.h"
#include "cc/blink/web_layer_impl.h"
@@ -28,15 +30,13 @@ cc::ScrollbarOrientation ConvertOrientation(
namespace cc_blink {
WebScrollbarLayerImpl::WebScrollbarLayerImpl(
- blink::WebScrollbar* scrollbar,
+ std::unique_ptr<blink::WebScrollbar> scrollbar,
blink::WebScrollbarThemePainter painter,
- blink::WebScrollbarThemeGeometry* geometry)
+ std::unique_ptr<blink::WebScrollbarThemeGeometry> geometry)
: layer_(new WebLayerImpl(PaintedScrollbarLayer::Create(
-
- std::unique_ptr<cc::Scrollbar>(
- new ScrollbarImpl(base::WrapUnique(scrollbar),
- painter,
- base::WrapUnique(geometry))),
+ base::MakeUnique<ScrollbarImpl>(std::move(scrollbar),
+ painter,
+ std::move(geometry)),
0))) {}
WebScrollbarLayerImpl::WebScrollbarLayerImpl(

Powered by Google App Engine
This is Rietveld 408576698