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

Unified Diff: cc/layers/scrollbar_layer_impl_base.h

Issue 23983047: Pinch/Zoom Infrastructure & Plumbing CL (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Draft for review. Created 7 years, 1 month 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
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 360ef9708952cd259de20f310afefdea5914d042..b585b00c030c0d02c9270ed7e3e8cc1f0d9199d7 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);
@@ -37,6 +46,7 @@ class CC_EXPORT ScrollbarLayerImplBase : public LayerImpl {
virtual void PushPropertiesTo(LayerImpl* layer) OVERRIDE;
virtual ScrollbarLayerImplBase* ToScrollbarLayer() OVERRIDE;
+ void PushScrollClipPropertiesTo(LayerImpl* layer);
void SetVisibleToTotalLengthRatio(float ratio);
virtual gfx::Rect ComputeThumbQuadRect() const;
@@ -46,12 +56,15 @@ class CC_EXPORT ScrollbarLayerImplBase : public LayerImpl {
}
void SetThumbThicknessScaleFactor(float thumb_thickness_scale_factor);
+ void ScrollbarParametersDidChange();
+
protected:
ScrollbarLayerImplBase(LayerTreeImpl* tree_impl,
int id,
ScrollbarOrientation orientation,
- bool is_left_side_vertical_scrollbar);
- virtual ~ScrollbarLayerImplBase() {}
+ bool is_left_side_vertical_scrollbar,
+ bool is_overlay);
+ virtual ~ScrollbarLayerImplBase();
gfx::Rect ScrollbarLayerRectToContentRect(gfx::RectF layer_rect) const;
@@ -66,7 +79,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_;
@@ -81,6 +95,7 @@ class CC_EXPORT ScrollbarLayerImplBase : public LayerImpl {
float visible_to_total_length_ratio_;
+
enne (OOO) 2013/11/14 22:59:01 Needless extra line.
wjmaclean 2013/12/24 21:03:49 Done.
DISALLOW_COPY_AND_ASSIGN(ScrollbarLayerImplBase);
};

Powered by Google App Engine
This is Rietveld 408576698