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

Side by Side Diff: cc/layers/solid_color_scrollbar_layer.cc

Issue 1783613004: CC Animation: Erase cc::LayerSettings everywhere. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@eraseandroid
Patch Set: Rebase. Created 4 years, 9 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/layers/solid_color_scrollbar_layer.h" 5 #include "cc/layers/solid_color_scrollbar_layer.h"
6 6
7 #include "base/memory/scoped_ptr.h" 7 #include "base/memory/scoped_ptr.h"
8 #include "cc/layers/layer_impl.h" 8 #include "cc/layers/layer_impl.h"
9 #include "cc/layers/solid_color_scrollbar_layer_impl.h" 9 #include "cc/layers/solid_color_scrollbar_layer_impl.h"
10 10
11 namespace cc { 11 namespace cc {
12 12
13 scoped_ptr<LayerImpl> SolidColorScrollbarLayer::CreateLayerImpl( 13 scoped_ptr<LayerImpl> SolidColorScrollbarLayer::CreateLayerImpl(
14 LayerTreeImpl* tree_impl) { 14 LayerTreeImpl* tree_impl) {
15 const bool kIsOverlayScrollbar = true; 15 const bool kIsOverlayScrollbar = true;
16 return SolidColorScrollbarLayerImpl::Create(tree_impl, 16 return SolidColorScrollbarLayerImpl::Create(tree_impl,
17 id(), 17 id(),
18 orientation(), 18 orientation(),
19 thumb_thickness_, 19 thumb_thickness_,
20 track_start_, 20 track_start_,
21 is_left_side_vertical_scrollbar_, 21 is_left_side_vertical_scrollbar_,
22 kIsOverlayScrollbar); 22 kIsOverlayScrollbar);
23 } 23 }
24 24
25 scoped_refptr<SolidColorScrollbarLayer> SolidColorScrollbarLayer::Create( 25 scoped_refptr<SolidColorScrollbarLayer> SolidColorScrollbarLayer::Create(
26 const LayerSettings& settings,
27 ScrollbarOrientation orientation, 26 ScrollbarOrientation orientation,
28 int thumb_thickness, 27 int thumb_thickness,
29 int track_start, 28 int track_start,
30 bool is_left_side_vertical_scrollbar, 29 bool is_left_side_vertical_scrollbar,
31 int scroll_layer_id) { 30 int scroll_layer_id) {
32 return make_scoped_refptr(new SolidColorScrollbarLayer( 31 return make_scoped_refptr(new SolidColorScrollbarLayer(
33 settings, orientation, thumb_thickness, track_start, 32 orientation, thumb_thickness, track_start,
34 is_left_side_vertical_scrollbar, scroll_layer_id)); 33 is_left_side_vertical_scrollbar, scroll_layer_id));
35 } 34 }
36 35
37 SolidColorScrollbarLayer::SolidColorScrollbarLayer( 36 SolidColorScrollbarLayer::SolidColorScrollbarLayer(
38 const LayerSettings& settings,
39 ScrollbarOrientation orientation, 37 ScrollbarOrientation orientation,
40 int thumb_thickness, 38 int thumb_thickness,
41 int track_start, 39 int track_start,
42 bool is_left_side_vertical_scrollbar, 40 bool is_left_side_vertical_scrollbar,
43 int scroll_layer_id) 41 int scroll_layer_id)
44 : Layer(settings), 42 : Layer(),
45 scroll_layer_id_(Layer::INVALID_ID), 43 scroll_layer_id_(Layer::INVALID_ID),
46 orientation_(orientation), 44 orientation_(orientation),
47 thumb_thickness_(thumb_thickness), 45 thumb_thickness_(thumb_thickness),
48 track_start_(track_start), 46 track_start_(track_start),
49 is_left_side_vertical_scrollbar_(is_left_side_vertical_scrollbar) { 47 is_left_side_vertical_scrollbar_(is_left_side_vertical_scrollbar) {}
50 }
51 48
52 SolidColorScrollbarLayer::~SolidColorScrollbarLayer() {} 49 SolidColorScrollbarLayer::~SolidColorScrollbarLayer() {}
53 50
54 ScrollbarLayerInterface* SolidColorScrollbarLayer::ToScrollbarLayer() { 51 ScrollbarLayerInterface* SolidColorScrollbarLayer::ToScrollbarLayer() {
55 return this; 52 return this;
56 } 53 }
57 54
58 void SolidColorScrollbarLayer::PushPropertiesTo(LayerImpl* layer) { 55 void SolidColorScrollbarLayer::PushPropertiesTo(LayerImpl* layer) {
59 Layer::PushPropertiesTo(layer); 56 Layer::PushPropertiesTo(layer);
60 SolidColorScrollbarLayerImpl* scrollbar_layer = 57 SolidColorScrollbarLayerImpl* scrollbar_layer =
(...skipping 20 matching lines...) Expand all
81 78
82 scroll_layer_id_ = layer_id; 79 scroll_layer_id_ = layer_id;
83 SetNeedsFullTreeSync(); 80 SetNeedsFullTreeSync();
84 } 81 }
85 82
86 ScrollbarOrientation SolidColorScrollbarLayer::orientation() const { 83 ScrollbarOrientation SolidColorScrollbarLayer::orientation() const {
87 return orientation_; 84 return orientation_;
88 } 85 }
89 86
90 } // namespace cc 87 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698