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

Side by Side Diff: cc/blink/scrollbar_impl.cc

Issue 1866203004: Convert //cc from scoped_ptr to std::unique_ptr. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: scopedptrcc: rebase Created 4 years, 8 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 unified diff | Download patch
« no previous file with comments | « cc/blink/scrollbar_impl.h ('k') | cc/blink/test/cc_blink_test_suite.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "cc/blink/scrollbar_impl.h" 5 #include "cc/blink/scrollbar_impl.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "third_party/WebKit/public/platform/WebScrollbar.h" 8 #include "third_party/WebKit/public/platform/WebScrollbar.h"
9 #include "third_party/WebKit/public/platform/WebScrollbarThemeGeometry.h" 9 #include "third_party/WebKit/public/platform/WebScrollbarThemeGeometry.h"
10 10
11 using blink::WebScrollbar; 11 using blink::WebScrollbar;
12 12
13 namespace cc_blink { 13 namespace cc_blink {
14 14
15 ScrollbarImpl::ScrollbarImpl( 15 ScrollbarImpl::ScrollbarImpl(
16 scoped_ptr<WebScrollbar> scrollbar, 16 std::unique_ptr<WebScrollbar> scrollbar,
17 blink::WebScrollbarThemePainter painter, 17 blink::WebScrollbarThemePainter painter,
18 scoped_ptr<blink::WebScrollbarThemeGeometry> geometry) 18 std::unique_ptr<blink::WebScrollbarThemeGeometry> geometry)
19 : scrollbar_(std::move(scrollbar)), 19 : scrollbar_(std::move(scrollbar)),
20 painter_(painter), 20 painter_(painter),
21 geometry_(std::move(geometry)) {} 21 geometry_(std::move(geometry)) {}
22 22
23 ScrollbarImpl::~ScrollbarImpl() { 23 ScrollbarImpl::~ScrollbarImpl() {
24 } 24 }
25 25
26 cc::ScrollbarOrientation ScrollbarImpl::Orientation() const { 26 cc::ScrollbarOrientation ScrollbarImpl::Orientation() const {
27 if (scrollbar_->orientation() == WebScrollbar::Horizontal) 27 if (scrollbar_->orientation() == WebScrollbar::Horizontal)
28 return cc::HORIZONTAL; 28 return cc::HORIZONTAL;
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 bool thumb_present = geometry_->hasThumb(scrollbar_.get()); 108 bool thumb_present = geometry_->hasThumb(scrollbar_.get());
109 if (thumb_present) { 109 if (thumb_present) {
110 painter_.paintForwardTrackPart(canvas, track_paint_rect); 110 painter_.paintForwardTrackPart(canvas, track_paint_rect);
111 painter_.paintBackTrackPart(canvas, track_paint_rect); 111 painter_.paintBackTrackPart(canvas, track_paint_rect);
112 } 112 }
113 113
114 painter_.paintTickmarks(canvas, track_paint_rect); 114 painter_.paintTickmarks(canvas, track_paint_rect);
115 } 115 }
116 116
117 } // namespace cc_blink 117 } // namespace cc_blink
OLDNEW
« no previous file with comments | « cc/blink/scrollbar_impl.h ('k') | cc/blink/test/cc_blink_test_suite.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698