| Index: cc/layers/painted_scrollbar_layer_impl.h
|
| diff --git a/cc/layers/painted_scrollbar_layer_impl.h b/cc/layers/painted_scrollbar_layer_impl.h
|
| index 1fb7972d84d85be970cd7654ea9dfd9c347da9f1..57a7330eeea1e14af66dbf780a6c4a53d53b97f2 100644
|
| --- a/cc/layers/painted_scrollbar_layer_impl.h
|
| +++ b/cc/layers/painted_scrollbar_layer_impl.h
|
| @@ -7,7 +7,7 @@
|
|
|
| #include "cc/base/cc_export.h"
|
| #include "cc/input/scrollbar.h"
|
| -#include "cc/layers/layer_impl.h"
|
| +#include "cc/layers/scrollbar_layer_impl_base.h"
|
| #include "cc/resources/ui_resource_client.h"
|
|
|
| namespace cc {
|
| @@ -15,7 +15,7 @@ namespace cc {
|
| class LayerTreeImpl;
|
| class ScrollView;
|
|
|
| -class CC_EXPORT PaintedScrollbarLayerImpl : public LayerImpl {
|
| +class CC_EXPORT PaintedScrollbarLayerImpl : public ScrollbarLayerImplBase {
|
| public:
|
| static scoped_ptr<PaintedScrollbarLayerImpl> Create(
|
| LayerTreeImpl* tree_impl,
|
| @@ -24,7 +24,6 @@ class CC_EXPORT PaintedScrollbarLayerImpl : public LayerImpl {
|
| virtual ~PaintedScrollbarLayerImpl();
|
|
|
| // LayerImpl implementation.
|
| - virtual PaintedScrollbarLayerImpl* ToScrollbarLayer() OVERRIDE;
|
| virtual scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl)
|
| OVERRIDE;
|
| virtual void PushPropertiesTo(LayerImpl* layer) OVERRIDE;
|
| @@ -34,67 +33,49 @@ class CC_EXPORT PaintedScrollbarLayerImpl : public LayerImpl {
|
| virtual void AppendQuads(QuadSink* quad_sink,
|
| AppendQuadsData* append_quads_data) OVERRIDE;
|
|
|
| - int scroll_layer_id() const { return scroll_layer_id_; }
|
| - void set_scroll_layer_id(int id) { scroll_layer_id_ = id; }
|
| -
|
| - ScrollbarOrientation Orientation() const;
|
| - float CurrentPos() const;
|
| - int Maximum() const;
|
| + virtual void DidLoseOutputSurface() OVERRIDE;
|
|
|
| void SetThumbThickness(int thumb_thickness);
|
| int thumb_thickness() const { return thumb_thickness_; }
|
| void SetThumbLength(int thumb_length);
|
| void SetTrackStart(int track_start);
|
| void SetTrackLength(int track_length);
|
| - void SetVerticalAdjust(float vertical_adjust);
|
| +
|
| void set_track_ui_resource_id(UIResourceId uid) {
|
| track_ui_resource_id_ = uid;
|
| }
|
| void set_thumb_ui_resource_id(UIResourceId uid) {
|
| thumb_ui_resource_id_ = uid;
|
| }
|
| - void SetVisibleToTotalLengthRatio(float ratio);
|
| - void set_is_overlay_scrollbar(bool is_overlay_scrollbar) {
|
| - is_overlay_scrollbar_ = is_overlay_scrollbar;
|
| - }
|
| - bool is_overlay_scrollbar() const { return is_overlay_scrollbar_; }
|
| -
|
| - void SetCurrentPos(float current_pos);
|
| - void SetMaximum(int maximum);
|
| -
|
| - gfx::Rect ComputeThumbQuadRect() const;
|
|
|
| protected:
|
| PaintedScrollbarLayerImpl(LayerTreeImpl* tree_impl,
|
| int id,
|
| ScrollbarOrientation orientation);
|
|
|
| + // ScrollbarLayerImplBase implementation.
|
| + virtual int ThumbThickness() const OVERRIDE;
|
| + virtual int ThumbLength() const OVERRIDE;
|
| + virtual float TrackLength() const OVERRIDE;
|
| + virtual int TrackStart() const OVERRIDE;
|
| +
|
| private:
|
| virtual const char* LayerTypeAsString() const OVERRIDE;
|
|
|
| - gfx::Rect ScrollbarLayerRectToContentRect(gfx::RectF layer_rect) const;
|
| -
|
| UIResourceId track_ui_resource_id_;
|
| UIResourceId thumb_ui_resource_id_;
|
|
|
| - float current_pos_;
|
| - int maximum_;
|
| int thumb_thickness_;
|
| int thumb_length_;
|
| int track_start_;
|
| int track_length_;
|
| - ScrollbarOrientation orientation_;
|
|
|
| // Difference between the clip layer's height and the visible viewport
|
| // height (which may differ in the presence of top-controls hiding).
|
| float vertical_adjust_;
|
|
|
| - float visible_to_total_length_ratio_;
|
| -
|
| int scroll_layer_id_;
|
|
|
| - bool is_overlay_scrollbar_;
|
| -
|
| DISALLOW_COPY_AND_ASSIGN(PaintedScrollbarLayerImpl);
|
| };
|
|
|
|
|