| Index: cc/layers/scrollbar_layer_impl_base.h
|
| diff --git a/cc/layers/scrollbar_layer_impl_base.h b/cc/layers/scrollbar_layer_impl_base.h
|
| index 55ade6ab04f18b5ab7691ca3e4555903046ca902..cba60d286221d310efaf6b11870a83e924553580 100644
|
| --- a/cc/layers/scrollbar_layer_impl_base.h
|
| +++ b/cc/layers/scrollbar_layer_impl_base.h
|
| @@ -7,6 +7,7 @@
|
|
|
| #include "cc/base/cc_export.h"
|
| #include "cc/input/scrollbar.h"
|
| +#include "cc/layers/layer.h"
|
| #include "cc/layers/layer_impl.h"
|
|
|
| namespace cc {
|
| @@ -15,8 +16,16 @@ class LayerTreeImpl;
|
|
|
| class CC_EXPORT ScrollbarLayerImplBase : public LayerImpl {
|
| public:
|
| - int ScrollLayerId() const { return scroll_layer_id_; }
|
| - void set_scroll_layer_id(int id) { scroll_layer_id_ = id; }
|
| + int ScrollLayerId() const {
|
| + return scroll_layer_ ? scroll_layer_->id() : Layer::INVALID_ID;
|
| + }
|
| + void ClearScrollLayer() { scroll_layer_ = NULL; }
|
| + void SetScrollLayerById(int id);
|
| + int ClipLayerId() const {
|
| + return clip_layer_ ? clip_layer_->id() : Layer::INVALID_ID;
|
| + }
|
| + void ClearClipLayer() { clip_layer_ = NULL; }
|
| + void SetClipLayerById(int id);
|
|
|
| float current_pos() const { return current_pos_; }
|
| void SetCurrentPos(float current_pos);
|
| @@ -48,12 +57,15 @@ class CC_EXPORT ScrollbarLayerImplBase : public LayerImpl {
|
| thumb_thickness_scale_factor_ = thumb_thickness_scale_factor;
|
| }
|
|
|
| + void ScrollbarParametersDidChange();
|
| + bool opacity_can_animate() { return opacity_can_animate_; }
|
| +
|
| protected:
|
| ScrollbarLayerImplBase(LayerTreeImpl* tree_impl,
|
| int id,
|
| ScrollbarOrientation orientation,
|
| bool is_left_side_vertical_scrollbar);
|
| - virtual ~ScrollbarLayerImplBase() {}
|
| + virtual ~ScrollbarLayerImplBase();
|
|
|
| gfx::Rect ScrollbarLayerRectToContentRect(gfx::RectF layer_rect) const;
|
|
|
| @@ -68,7 +80,8 @@ class CC_EXPORT ScrollbarLayerImplBase : public LayerImpl {
|
| virtual int TrackStart() const = 0;
|
|
|
| private:
|
| - int scroll_layer_id_;
|
| + LayerImpl* scroll_layer_;
|
| + LayerImpl* clip_layer_;
|
| bool is_overlay_scrollbar_;
|
|
|
| float thumb_thickness_scale_factor_;
|
| @@ -83,7 +96,11 @@ class CC_EXPORT ScrollbarLayerImplBase : public LayerImpl {
|
|
|
| float visible_to_total_length_ratio_;
|
|
|
| +
|
| DISALLOW_COPY_AND_ASSIGN(ScrollbarLayerImplBase);
|
| +
|
| + protected:
|
| + bool opacity_can_animate_;
|
| };
|
|
|
| } // namespace cc
|
|
|