| 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 <memory> | 7 #include <memory> |
| 8 | 8 |
| 9 #include "cc/layers/layer_impl.h" | 9 #include "cc/layers/layer_impl.h" |
| 10 #include "cc/layers/solid_color_scrollbar_layer_impl.h" | 10 #include "cc/layers/solid_color_scrollbar_layer_impl.h" |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 SolidColorScrollbarLayer::SolidColorScrollbarLayer( | 39 SolidColorScrollbarLayer::SolidColorScrollbarLayer( |
| 40 ScrollbarOrientation orientation, | 40 ScrollbarOrientation orientation, |
| 41 int thumb_thickness, | 41 int thumb_thickness, |
| 42 int track_start, | 42 int track_start, |
| 43 bool is_left_side_vertical_scrollbar, | 43 bool is_left_side_vertical_scrollbar, |
| 44 int scroll_layer_id) | 44 int scroll_layer_id) |
| 45 : scroll_layer_id_(Layer::INVALID_ID), | 45 : scroll_layer_id_(Layer::INVALID_ID), |
| 46 orientation_(orientation), | 46 orientation_(orientation), |
| 47 thumb_thickness_(thumb_thickness), | 47 thumb_thickness_(thumb_thickness), |
| 48 track_start_(track_start), | 48 track_start_(track_start), |
| 49 is_left_side_vertical_scrollbar_(is_left_side_vertical_scrollbar) {} | 49 is_left_side_vertical_scrollbar_(is_left_side_vertical_scrollbar) { |
| 50 SetOpacity(0.f); |
| 51 } |
| 50 | 52 |
| 51 SolidColorScrollbarLayer::~SolidColorScrollbarLayer() {} | 53 SolidColorScrollbarLayer::~SolidColorScrollbarLayer() {} |
| 52 | 54 |
| 53 ScrollbarLayerInterface* SolidColorScrollbarLayer::ToScrollbarLayer() { | 55 ScrollbarLayerInterface* SolidColorScrollbarLayer::ToScrollbarLayer() { |
| 54 return this; | 56 return this; |
| 55 } | 57 } |
| 56 | 58 |
| 57 void SolidColorScrollbarLayer::PushPropertiesTo(LayerImpl* layer) { | 59 void SolidColorScrollbarLayer::PushPropertiesTo(LayerImpl* layer) { |
| 58 Layer::PushPropertiesTo(layer); | 60 Layer::PushPropertiesTo(layer); |
| 59 SolidColorScrollbarLayerImpl* scrollbar_layer = | 61 SolidColorScrollbarLayerImpl* scrollbar_layer = |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 117 proto.solid_scrollbar(); | 119 proto.solid_scrollbar(); |
| 118 scroll_layer_id_ = scrollbar.scroll_layer_id(); | 120 scroll_layer_id_ = scrollbar.scroll_layer_id(); |
| 119 thumb_thickness_ = scrollbar.thumb_thickness(); | 121 thumb_thickness_ = scrollbar.thumb_thickness(); |
| 120 track_start_ = scrollbar.track_start(); | 122 track_start_ = scrollbar.track_start(); |
| 121 is_left_side_vertical_scrollbar_ = | 123 is_left_side_vertical_scrollbar_ = |
| 122 scrollbar.is_left_side_vertical_scrollbar(); | 124 scrollbar.is_left_side_vertical_scrollbar(); |
| 123 orientation_ = ScrollbarOrientationFromProto(scrollbar.orientation()); | 125 orientation_ = ScrollbarOrientationFromProto(scrollbar.orientation()); |
| 124 } | 126 } |
| 125 | 127 |
| 126 } // namespace cc | 128 } // namespace cc |
| OLD | NEW |