Index: cc/layers/layer_impl.h |
diff --git a/cc/layers/layer_impl.h b/cc/layers/layer_impl.h |
index 16747aa9a5bc258a58f854d10b38aad737c22e2d..99642cb2a26f7d3701a0a01d6c63693fc27ad109 100644 |
--- a/cc/layers/layer_impl.h |
+++ b/cc/layers/layer_impl.h |
@@ -65,6 +65,15 @@ enum DrawMode { |
class CC_EXPORT LayerImpl : public LayerAnimationValueObserver, |
public LayerAnimationValueProvider { |
public: |
+ // Allows for the ownership of the total scroll offset to be delegated outside |
+ // of the layer. |
+ class ScrollOffsetDelegate { |
+ public: |
+ virtual void SetTotalScrollOffset(const gfx::Vector2dF& new_value) = 0; |
+ virtual gfx::Vector2dF GetTotalScrollOffset() = 0; |
+ virtual bool IsExternalFlingActive() const = 0; |
+ }; |
+ |
typedef LayerImplList RenderSurfaceListType; |
typedef LayerImplList LayerListType; |
typedef RenderSurfaceImpl RenderSurfaceType; |
@@ -361,8 +370,7 @@ class CC_EXPORT LayerImpl : public LayerAnimationValueObserver, |
float* contents_scale_y, |
gfx::Size* content_bounds); |
- void SetScrollOffsetDelegate( |
- LayerScrollOffsetDelegate* scroll_offset_delegate); |
+ void SetScrollOffsetDelegate(ScrollOffsetDelegate* scroll_offset_delegate); |
bool IsExternalFlingActive() const; |
void SetScrollOffset(const gfx::Vector2d& scroll_offset); |
@@ -594,7 +602,7 @@ class CC_EXPORT LayerImpl : public LayerAnimationValueObserver, |
gfx::Size bounds_; |
gfx::SizeF temporary_impl_bounds_; |
gfx::Vector2d scroll_offset_; |
- LayerScrollOffsetDelegate* scroll_offset_delegate_; |
+ ScrollOffsetDelegate* scroll_offset_delegate_; |
LayerImpl* scroll_clip_layer_; |
bool scrollable_ : 1; |
bool should_scroll_on_main_thread_ : 1; |