blob: de46c5429a7f2b7244e5279542294d48730a3e22 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
|
// Copyright 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef CC_LAYERS_SOLID_COLOR_SCROLLBAR_LAYER_H_
#define CC_LAYERS_SOLID_COLOR_SCROLLBAR_LAYER_H_
#include "cc/base/cc_export.h"
#include "cc/layers/layer.h"
#include "cc/layers/scrollbar_layer_interface.h"
namespace cc {
class CC_EXPORT SolidColorScrollbarLayer : public ScrollbarLayerInterface,
public Layer {
public:
virtual scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl)
override;
static scoped_refptr<SolidColorScrollbarLayer> Create(
ScrollbarOrientation orientation,
int thumb_thickness,
int track_start,
bool is_left_side_vertical_scrollbar,
int scroll_layer_id);
// Layer overrides.
virtual bool OpacityCanAnimateOnImplThread() const override;
virtual ScrollbarLayerInterface* ToScrollbarLayer() override;
virtual void PushPropertiesTo(LayerImpl* layer) override;
virtual void PushScrollClipPropertiesTo(LayerImpl* layer) override;
virtual void SetNeedsDisplayRect(const gfx::RectF&) override;
// ScrollbarLayerInterface
virtual int ScrollLayerId() const override;
virtual void SetScrollLayer(int layer_id) override;
virtual void SetClipLayer(int layer_id) override;
virtual ScrollbarOrientation orientation() const override;
protected:
SolidColorScrollbarLayer(ScrollbarOrientation orientation,
int thumb_thickness,
int track_start,
bool is_left_side_vertical_scrollbar,
int scroll_layer_id);
virtual ~SolidColorScrollbarLayer();
private:
int scroll_layer_id_;
int clip_layer_id_;
ScrollbarOrientation orientation_;
int thumb_thickness_;
int track_start_;
bool is_left_side_vertical_scrollbar_;
DISALLOW_COPY_AND_ASSIGN(SolidColorScrollbarLayer);
};
} // namespace cc
#endif // CC_LAYERS_SOLID_COLOR_SCROLLBAR_LAYER_H_
|