| 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_IMPL_H_ | 5 #ifndef CC_LAYERS_SOLID_COLOR_SCROLLBAR_LAYER_IMPL_H_ |
| 6 #define CC_LAYERS_SOLID_COLOR_SCROLLBAR_LAYER_IMPL_H_ | 6 #define CC_LAYERS_SOLID_COLOR_SCROLLBAR_LAYER_IMPL_H_ |
| 7 | 7 |
| 8 #include "cc/base/cc_export.h" | 8 #include "cc/base/cc_export.h" |
| 9 #include "cc/layers/scrollbar_layer_impl_base.h" | 9 #include "cc/layers/scrollbar_layer_impl_base.h" |
| 10 | 10 |
| 11 namespace cc { | 11 namespace cc { |
| 12 | 12 |
| 13 class CC_EXPORT SolidColorScrollbarLayerImpl : public ScrollbarLayerImplBase { | 13 class CC_EXPORT SolidColorScrollbarLayerImpl : public ScrollbarLayerImplBase { |
| 14 public: | 14 public: |
| 15 static scoped_ptr<SolidColorScrollbarLayerImpl> Create( | 15 static scoped_ptr<SolidColorScrollbarLayerImpl> Create( |
| 16 LayerTreeImpl* tree_impl, | 16 LayerTreeImpl* tree_impl, |
| 17 int id, | 17 int id, |
| 18 ScrollbarOrientation orientation, | 18 ScrollbarOrientation orientation, |
| 19 int thumb_thickness, | 19 int thumb_thickness, |
| 20 int track_start, | 20 int track_start, |
| 21 bool is_left_side_vertical_scrollbar, | 21 bool is_left_side_vertical_scrollbar, |
| 22 bool is_overlay); | 22 bool is_overlay); |
| 23 virtual ~SolidColorScrollbarLayerImpl(); | 23 virtual ~SolidColorScrollbarLayerImpl(); |
| 24 | 24 |
| 25 // LayerImpl overrides. | 25 // LayerImpl overrides. |
| 26 virtual scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) | 26 virtual scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) |
| 27 OVERRIDE; | 27 override; |
| 28 virtual void PushPropertiesTo(LayerImpl* layer) OVERRIDE; | 28 virtual void PushPropertiesTo(LayerImpl* layer) override; |
| 29 | 29 |
| 30 virtual void AppendQuads(RenderPass* render_pass, | 30 virtual void AppendQuads(RenderPass* render_pass, |
| 31 const OcclusionTracker<LayerImpl>& occlusion_tracker, | 31 const OcclusionTracker<LayerImpl>& occlusion_tracker, |
| 32 AppendQuadsData* append_quads_data) OVERRIDE; | 32 AppendQuadsData* append_quads_data) override; |
| 33 | 33 |
| 34 protected: | 34 protected: |
| 35 SolidColorScrollbarLayerImpl(LayerTreeImpl* tree_impl, | 35 SolidColorScrollbarLayerImpl(LayerTreeImpl* tree_impl, |
| 36 int id, | 36 int id, |
| 37 ScrollbarOrientation orientation, | 37 ScrollbarOrientation orientation, |
| 38 int thumb_thickness, | 38 int thumb_thickness, |
| 39 int track_start, | 39 int track_start, |
| 40 bool is_left_side_vertical_scrollbar, | 40 bool is_left_side_vertical_scrollbar, |
| 41 bool is_overlay); | 41 bool is_overlay); |
| 42 | 42 |
| 43 // ScrollbarLayerImplBase implementation. | 43 // ScrollbarLayerImplBase implementation. |
| 44 virtual int ThumbThickness() const OVERRIDE; | 44 virtual int ThumbThickness() const override; |
| 45 virtual int ThumbLength() const OVERRIDE; | 45 virtual int ThumbLength() const override; |
| 46 virtual float TrackLength() const OVERRIDE; | 46 virtual float TrackLength() const override; |
| 47 virtual int TrackStart() const OVERRIDE; | 47 virtual int TrackStart() const override; |
| 48 virtual bool IsThumbResizable() const OVERRIDE; | 48 virtual bool IsThumbResizable() const override; |
| 49 | 49 |
| 50 private: | 50 private: |
| 51 int thumb_thickness_; | 51 int thumb_thickness_; |
| 52 int track_start_; | 52 int track_start_; |
| 53 SkColor color_; | 53 SkColor color_; |
| 54 }; | 54 }; |
| 55 | 55 |
| 56 } // namespace cc | 56 } // namespace cc |
| 57 | 57 |
| 58 #endif // CC_LAYERS_SOLID_COLOR_SCROLLBAR_LAYER_IMPL_H_ | 58 #endif // CC_LAYERS_SOLID_COLOR_SCROLLBAR_LAYER_IMPL_H_ |
| OLD | NEW |