Index: cc/layers/layer_impl.h |
diff --git a/cc/layers/layer_impl.h b/cc/layers/layer_impl.h |
index e712b7e0ba3ebd2b16cf8b9513b72a42bb1191ee..136c75351126e2d76b75792005033c457b39a6a9 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); |
@@ -592,7 +600,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; |