Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1120)

Unified Diff: cc/layers/painted_scrollbar_layer.h

Issue 18341009: Refactor cc scrollbar layers to separate solid-color vs desktop. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix Windows compile. Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/layers/layer_impl.cc ('k') | cc/layers/painted_scrollbar_layer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/painted_scrollbar_layer.h
diff --git a/cc/layers/painted_scrollbar_layer.h b/cc/layers/painted_scrollbar_layer.h
index 1e103d7ecdfa0218460214ec6e22c4bfaa3bce0f..8140f8c28356f29c43d58ec1ed8eef68172ae797 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,6 +72,7 @@ class CC_EXPORT PaintedScrollbarLayer : public ContentsScalingLayer {
ScrollbarPart part);
scoped_ptr<Scrollbar> scrollbar_;
+ int scroll_layer_id_;
// Snapshot of properties taken in UpdateThumbAndTrackGeometry and used in
// PushPropertiesTo.
@@ -78,8 +81,6 @@ class CC_EXPORT PaintedScrollbarLayer : public ContentsScalingLayer {
gfx::Point location_;
gfx::Rect track_rect_;
- int scroll_layer_id_;
-
scoped_ptr<ScopedUIResource> track_resource_;
scoped_ptr<ScopedUIResource> thumb_resource_;
« no previous file with comments | « cc/layers/layer_impl.cc ('k') | cc/layers/painted_scrollbar_layer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698