Chromium Code Reviews| Index: cc/layers/painted_scrollbar_layer.h |
| diff --git a/cc/layers/painted_scrollbar_layer.h b/cc/layers/painted_scrollbar_layer.h |
| index 48fb3765e502037c4ec90683f0f83c531270dfa8..3ffb5f1ea2913c5a684b7a3c43de48cdff79c43d 100644 |
| --- a/cc/layers/painted_scrollbar_layer.h |
| +++ b/cc/layers/painted_scrollbar_layer.h |
| @@ -8,6 +8,7 @@ |
| #include "cc/base/cc_export.h" |
| #include "cc/input/scrollbar.h" |
| #include "cc/layers/contents_scaling_layer.h" |
| +#include "cc/layers/scrollbar_layer_interface.h" |
| #include "cc/layers/scrollbar_theme_painter.h" |
| #include "cc/resources/layer_updater.h" |
| #include "cc/resources/scoped_ui_resource.h" |
| @@ -15,7 +16,8 @@ |
| namespace cc { |
| class ScrollbarThemeComposite; |
| -class CC_EXPORT PaintedScrollbarLayer : public ContentsScalingLayer { |
| +class CC_EXPORT PaintedScrollbarLayer : public ScrollbarLayerInterface, |
| + public ContentsScalingLayer { |
| public: |
| virtual scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) |
| OVERRIDE; |
| @@ -24,12 +26,14 @@ class CC_EXPORT PaintedScrollbarLayer : public ContentsScalingLayer { |
| scoped_ptr<Scrollbar> scrollbar, |
| int scroll_layer_id); |
| - int scroll_layer_id() const { return scroll_layer_id_; } |
| - void SetScrollLayerId(int id); |
| - |
| virtual bool OpacityCanAnimateOnImplThread() const OVERRIDE; |
| + virtual ScrollbarLayerInterface* ToScrollbarLayer() OVERRIDE; |
| + |
| + // ScrollbarLayerInterface |
| + virtual int ScrollLayerId() const OVERRIDE; |
| + virtual void SetScrollLayerId(int id) OVERRIDE; |
| - ScrollbarOrientation Orientation() const; |
| + virtual ScrollbarOrientation orientation() const OVERRIDE; |
| // Layer interface |
| virtual bool Update(ResourceUpdateQueue* queue, |
| @@ -44,8 +48,6 @@ class CC_EXPORT PaintedScrollbarLayer : public ContentsScalingLayer { |
| float* contents_scale_y, |
| gfx::Size* content_bounds) OVERRIDE; |
| - virtual PaintedScrollbarLayer* ToScrollbarLayer() OVERRIDE; |
| - |
| protected: |
| PaintedScrollbarLayer(scoped_ptr<Scrollbar> scrollbar, int scroll_layer_id); |
| virtual ~PaintedScrollbarLayer(); |
| @@ -70,11 +72,11 @@ class CC_EXPORT PaintedScrollbarLayer : public ContentsScalingLayer { |
| ScrollbarPart part); |
| scoped_ptr<Scrollbar> scrollbar_; |
| + int scroll_layer_id_; |
| int thumb_thickness_; |
|
enne (OOO)
2013/08/28 18:22:08
Can you initialize these in the ctor?
wjmaclean
2013/08/28 20:51:46
Done.
|
| int thumb_length_; |
| gfx::Rect track_rect_; |
| - int scroll_layer_id_; |
| scoped_ptr<ScopedUIResource> track_resource_; |
| scoped_ptr<ScopedUIResource> thumb_resource_; |