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 scoped_ptr
<LayerImpl
> CreateLayerImpl(LayerTreeImpl
* tree_impl
) override
;
19 static scoped_refptr
<SolidColorScrollbarLayer
> Create(
20 ScrollbarOrientation orientation
,
23 bool is_left_side_vertical_scrollbar
,
27 bool OpacityCanAnimateOnImplThread() const override
;
28 ScrollbarLayerInterface
* ToScrollbarLayer() override
;
30 void PushPropertiesTo(LayerImpl
* layer
) override
;
31 void PushScrollClipPropertiesTo(LayerImpl
* layer
) override
;
33 void SetNeedsDisplayRect(const gfx::Rect
& rect
) override
;
35 // ScrollbarLayerInterface
36 int ScrollLayerId() const override
;
37 void SetScrollLayer(int layer_id
) override
;
38 void SetClipLayer(int layer_id
) override
;
40 ScrollbarOrientation
orientation() const override
;
43 SolidColorScrollbarLayer(ScrollbarOrientation orientation
,
46 bool is_left_side_vertical_scrollbar
,
48 ~SolidColorScrollbarLayer() override
;
53 ScrollbarOrientation orientation_
;
56 bool is_left_side_vertical_scrollbar_
;
58 DISALLOW_COPY_AND_ASSIGN(SolidColorScrollbarLayer
);
63 #endif // CC_LAYERS_SOLID_COLOR_SCROLLBAR_LAYER_H_