- add sources.
[platform/framework/web/crosswalk.git] / src / cc / layers / solid_color_scrollbar_layer_impl.h
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
3 // found in the LICENSE file.
4
5 #ifndef CC_LAYERS_SOLID_COLOR_SCROLLBAR_LAYER_IMPL_H_
6 #define CC_LAYERS_SOLID_COLOR_SCROLLBAR_LAYER_IMPL_H_
7
8 #include "cc/base/cc_export.h"
9 #include "cc/layers/scrollbar_layer_impl_base.h"
10
11 namespace cc {
12
13 class CC_EXPORT SolidColorScrollbarLayerImpl : public ScrollbarLayerImplBase {
14  public:
15   static scoped_ptr<SolidColorScrollbarLayerImpl> Create(
16       LayerTreeImpl* tree_impl,
17       int id,
18       ScrollbarOrientation orientation,
19       int thumb_thickness,
20       bool is_left_side_vertical_scrollbar);
21   virtual ~SolidColorScrollbarLayerImpl();
22
23   // LayerImpl overrides.
24   virtual scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl)
25       OVERRIDE;
26   virtual void PushPropertiesTo(LayerImpl* layer) OVERRIDE;
27
28   virtual void AppendQuads(QuadSink* quad_sink,
29                            AppendQuadsData* append_quads_data) OVERRIDE;
30
31
32  protected:
33   SolidColorScrollbarLayerImpl(LayerTreeImpl* tree_impl,
34                                int id,
35                                ScrollbarOrientation orientation,
36                                int thumb_thickness,
37                                bool is_left_side_vertical_scrollbar);
38
39   // ScrollbarLayerImplBase implementation.
40   virtual int ThumbThickness() const OVERRIDE;
41   virtual int ThumbLength() const OVERRIDE;
42   virtual float TrackLength() const OVERRIDE;
43   virtual int TrackStart() const OVERRIDE;
44
45  private:
46   int thumb_thickness_;
47   SkColor color_;
48 };
49
50 }  // namespace cc
51
52 #endif  // CC_LAYERS_SOLID_COLOR_SCROLLBAR_LAYER_IMPL_H_