OLD | NEW |
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 .PassAs<LayerImpl>(); | |
24 } | 23 } |
25 | 24 |
26 scoped_refptr<SolidColorScrollbarLayer> SolidColorScrollbarLayer::Create( | 25 scoped_refptr<SolidColorScrollbarLayer> SolidColorScrollbarLayer::Create( |
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( | 31 return make_scoped_refptr( |
33 new SolidColorScrollbarLayer(orientation, | 32 new SolidColorScrollbarLayer(orientation, |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 | 94 |
96 clip_layer_id_ = layer_id; | 95 clip_layer_id_ = layer_id; |
97 SetNeedsFullTreeSync(); | 96 SetNeedsFullTreeSync(); |
98 } | 97 } |
99 | 98 |
100 ScrollbarOrientation SolidColorScrollbarLayer::orientation() const { | 99 ScrollbarOrientation SolidColorScrollbarLayer::orientation() const { |
101 return orientation_; | 100 return orientation_; |
102 } | 101 } |
103 | 102 |
104 } // namespace cc | 103 } // namespace cc |
OLD | NEW |