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.
5 #ifndef CC_LAYERS_SOLID_COLOR_SCROLLBAR_LAYER_H_
6 #define CC_LAYERS_SOLID_COLOR_SCROLLBAR_LAYER_H_
8 #include "cc/base/cc_export.h"
9 #include "cc/layers/layer.h"
10 #include "cc/layers/scrollbar_layer_interface.h"
14 class CC_EXPORT SolidColorScrollbarLayer : public ScrollbarLayerInterface,
17 virtual scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl)
20 static scoped_refptr<SolidColorScrollbarLayer> Create(
21 ScrollbarOrientation orientation,
23 bool is_left_side_vertical_scrollbar,
27 virtual bool OpacityCanAnimateOnImplThread() const OVERRIDE;
28 virtual ScrollbarLayerInterface* ToScrollbarLayer() OVERRIDE;
30 virtual void PushPropertiesTo(LayerImpl* layer) OVERRIDE;
31 virtual void PushScrollClipPropertiesTo(LayerImpl* layer) OVERRIDE;
33 // ScrollbarLayerInterface
34 virtual int ScrollLayerId() const OVERRIDE;
35 virtual void SetScrollLayer(int layer_id) OVERRIDE;
36 virtual void SetClipLayer(int layer_id) OVERRIDE;
38 virtual ScrollbarOrientation orientation() const OVERRIDE;
41 SolidColorScrollbarLayer(ScrollbarOrientation orientation,
43 bool is_left_side_vertical_scrollbar,
45 virtual ~SolidColorScrollbarLayer();
50 ScrollbarOrientation orientation_;
52 bool is_left_side_vertical_scrollbar_;
54 DISALLOW_COPY_AND_ASSIGN(SolidColorScrollbarLayer);
59 #endif // CC_LAYERS_SOLID_COLOR_SCROLLBAR_LAYER_H_