| 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 #ifndef CC_LAYERS_SOLID_COLOR_SCROLLBAR_LAYER_H_ | 5 #ifndef CC_LAYERS_SOLID_COLOR_SCROLLBAR_LAYER_H_ |
| 6 #define CC_LAYERS_SOLID_COLOR_SCROLLBAR_LAYER_H_ | 6 #define CC_LAYERS_SOLID_COLOR_SCROLLBAR_LAYER_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "cc/base/cc_export.h" | 9 #include "cc/base/cc_export.h" |
| 10 #include "cc/layers/layer.h" | 10 #include "cc/layers/layer.h" |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 int thumb_thickness, | 22 int thumb_thickness, |
| 23 int track_start, | 23 int track_start, |
| 24 bool is_left_side_vertical_scrollbar, | 24 bool is_left_side_vertical_scrollbar, |
| 25 int scroll_layer_id); | 25 int scroll_layer_id); |
| 26 | 26 |
| 27 // Layer overrides. | 27 // Layer overrides. |
| 28 bool OpacityCanAnimateOnImplThread() const override; | 28 bool OpacityCanAnimateOnImplThread() const override; |
| 29 bool AlwaysUseActiveTreeOpacity() const override; | 29 bool AlwaysUseActiveTreeOpacity() const override; |
| 30 ScrollbarLayerInterface* ToScrollbarLayer() override; | 30 ScrollbarLayerInterface* ToScrollbarLayer() override; |
| 31 void ToLayerNodeProto(proto::LayerNode* proto) const override; | 31 void ToLayerNodeProto(proto::LayerNode* proto) const override; |
| 32 void FromLayerNodeProto(const proto::LayerNode& proto, | |
| 33 const LayerIdMap& layer_map, | |
| 34 LayerTreeHost* layer_tree_host) override; | |
| 35 | 32 |
| 36 void SetOpacity(float opacity) override; | 33 void SetOpacity(float opacity) override; |
| 37 void PushPropertiesTo(LayerImpl* layer) override; | 34 void PushPropertiesTo(LayerImpl* layer) override; |
| 38 | 35 |
| 39 void SetNeedsDisplayRect(const gfx::Rect& rect) override; | 36 void SetNeedsDisplayRect(const gfx::Rect& rect) override; |
| 40 | 37 |
| 41 // ScrollbarLayerInterface | 38 // ScrollbarLayerInterface |
| 42 int ScrollLayerId() const override; | 39 int ScrollLayerId() const override; |
| 43 void SetScrollLayer(int layer_id) override; | 40 void SetScrollLayer(int layer_id) override; |
| 44 | 41 |
| 45 ScrollbarOrientation orientation() const override; | 42 ScrollbarOrientation orientation() const override; |
| 46 | 43 |
| 44 int thumb_thickness() const { |
| 45 return solid_color_scrollbar_layer_inputs_.thumb_thickness; |
| 46 } |
| 47 |
| 48 int track_start() const { |
| 49 return solid_color_scrollbar_layer_inputs_.track_start; |
| 50 } |
| 51 |
| 52 bool is_left_side_vertical_scrollbar() const { |
| 53 return solid_color_scrollbar_layer_inputs_.is_left_side_vertical_scrollbar; |
| 54 } |
| 55 |
| 47 protected: | 56 protected: |
| 48 SolidColorScrollbarLayer(ScrollbarOrientation orientation, | 57 SolidColorScrollbarLayer(ScrollbarOrientation orientation, |
| 49 int thumb_thickness, | 58 int thumb_thickness, |
| 50 int track_start, | 59 int track_start, |
| 51 bool is_left_side_vertical_scrollbar, | 60 bool is_left_side_vertical_scrollbar, |
| 52 int scroll_layer_id); | 61 int scroll_layer_id); |
| 53 ~SolidColorScrollbarLayer() override; | 62 ~SolidColorScrollbarLayer() override; |
| 54 | 63 |
| 55 // Layer overrides for proto conversions. | 64 // Layer overrides for proto conversions. |
| 56 void SetTypeForProtoSerialization(proto::LayerNode* proto) const override; | 65 void SetTypeForProtoSerialization(proto::LayerNode* proto) const override; |
| (...skipping 18 matching lines...) Expand all Loading... |
| 75 }; | 84 }; |
| 76 | 85 |
| 77 SolidColorScrollbarLayerInputs solid_color_scrollbar_layer_inputs_; | 86 SolidColorScrollbarLayerInputs solid_color_scrollbar_layer_inputs_; |
| 78 | 87 |
| 79 DISALLOW_COPY_AND_ASSIGN(SolidColorScrollbarLayer); | 88 DISALLOW_COPY_AND_ASSIGN(SolidColorScrollbarLayer); |
| 80 }; | 89 }; |
| 81 | 90 |
| 82 } // namespace cc | 91 } // namespace cc |
| 83 | 92 |
| 84 #endif // CC_LAYERS_SOLID_COLOR_SCROLLBAR_LAYER_H_ | 93 #endif // CC_LAYERS_SOLID_COLOR_SCROLLBAR_LAYER_H_ |
| OLD | NEW |