Update To 11.40.268.0
[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       int track_start,
21       bool is_left_side_vertical_scrollbar,
22       bool is_overlay);
23   ~SolidColorScrollbarLayerImpl() override;
24
25   // LayerImpl overrides.
26   scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) override;
27   void PushPropertiesTo(LayerImpl* layer) override;
28
29   void AppendQuads(RenderPass* render_pass,
30                    const Occlusion& occlusion_in_content_space,
31                    AppendQuadsData* append_quads_data) override;
32
33  protected:
34   SolidColorScrollbarLayerImpl(LayerTreeImpl* tree_impl,
35                                int id,
36                                ScrollbarOrientation orientation,
37                                int thumb_thickness,
38                                int track_start,
39                                bool is_left_side_vertical_scrollbar,
40                                bool is_overlay);
41
42   // ScrollbarLayerImplBase implementation.
43   int ThumbThickness() const override;
44   int ThumbLength() const override;
45   float TrackLength() const override;
46   int TrackStart() const override;
47   bool IsThumbResizable() const override;
48
49  private:
50   int thumb_thickness_;
51   int track_start_;
52   SkColor color_;
53 };
54
55 }  // namespace cc
56
57 #endif  // CC_LAYERS_SOLID_COLOR_SCROLLBAR_LAYER_IMPL_H_