Revert "Reland c91b178b07b0d - Delete dead signin code (SigninGlobalError)"
[chromium-blink-merge.git] / cc / layers / solid_color_scrollbar_layer.h
blob6097014ca22b119e8b39471f5301fa75fb8a44e7
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"
12 namespace cc {
14 class CC_EXPORT SolidColorScrollbarLayer : public ScrollbarLayerInterface,
15 public Layer {
16 public:
17 scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) override;
19 static scoped_refptr<SolidColorScrollbarLayer> Create(
20 const LayerSettings& settings,
21 ScrollbarOrientation orientation,
22 int thumb_thickness,
23 int track_start,
24 bool is_left_side_vertical_scrollbar,
25 int scroll_layer_id);
27 // Layer overrides.
28 bool OpacityCanAnimateOnImplThread() const override;
29 ScrollbarLayerInterface* ToScrollbarLayer() override;
31 void PushPropertiesTo(LayerImpl* layer) override;
32 void PushScrollClipPropertiesTo(LayerImpl* layer) override;
34 void SetNeedsDisplayRect(const gfx::Rect& rect) override;
36 // ScrollbarLayerInterface
37 int ScrollLayerId() const override;
38 void SetScrollLayer(int layer_id) override;
39 void SetClipLayer(int layer_id) override;
41 ScrollbarOrientation orientation() const override;
43 protected:
44 SolidColorScrollbarLayer(const LayerSettings& settings,
45 ScrollbarOrientation orientation,
46 int thumb_thickness,
47 int track_start,
48 bool is_left_side_vertical_scrollbar,
49 int scroll_layer_id);
50 ~SolidColorScrollbarLayer() override;
52 private:
53 int scroll_layer_id_;
54 int clip_layer_id_;
55 ScrollbarOrientation orientation_;
56 int thumb_thickness_;
57 int track_start_;
58 bool is_left_side_vertical_scrollbar_;
60 DISALLOW_COPY_AND_ASSIGN(SolidColorScrollbarLayer);
63 } // namespace cc
65 #endif // CC_LAYERS_SOLID_COLOR_SCROLLBAR_LAYER_H_