| Index: cc/layers/layer_impl.h
|
| diff --git a/cc/layers/layer_impl.h b/cc/layers/layer_impl.h
|
| index b13dce911a61eeac191d853027b8edfd841c8595..2cfa04082ef703f3d0bd15ab54481fa7b6239614 100644
|
| --- a/cc/layers/layer_impl.h
|
| +++ b/cc/layers/layer_impl.h
|
| @@ -80,16 +80,6 @@ class CC_EXPORT LayerImpl : public LayerAnimationValueObserver,
|
| public LayerAnimationValueProvider,
|
| public AnimationDelegate {
|
| public:
|
| - // Allows for the ownership of the total scroll offset to be delegated outside
|
| - // of the layer.
|
| - class ScrollOffsetDelegate {
|
| - public:
|
| - virtual void SetCurrentScrollOffset(const gfx::ScrollOffset& new_value) = 0;
|
| - virtual gfx::ScrollOffset GetCurrentScrollOffset() = 0;
|
| - virtual bool IsExternalFlingActive() const = 0;
|
| - virtual void Update() const = 0;
|
| - };
|
| -
|
| typedef SyncedProperty<AdditionGroup<gfx::ScrollOffset>> SyncedScrollOffset;
|
| typedef LayerImplList RenderSurfaceListType;
|
| typedef LayerImplList LayerListType;
|
| @@ -390,11 +380,11 @@ class CC_EXPORT LayerImpl : public LayerAnimationValueObserver,
|
| float contents_scale_y() const { return draw_properties_.contents_scale_y; }
|
| void SetContentsScale(float contents_scale_x, float contents_scale_y);
|
|
|
| - void SetScrollOffsetDelegate(ScrollOffsetDelegate* scroll_offset_delegate);
|
| - void RefreshFromScrollDelegate();
|
| bool IsExternalFlingActive() const;
|
|
|
| void SetCurrentScrollOffset(const gfx::ScrollOffset& scroll_offset);
|
| + void SetCurrentScrollOffsetFromDelegate(
|
| + const gfx::ScrollOffset& scroll_offset);
|
| void PushScrollOffsetFromMainThread(const gfx::ScrollOffset& scroll_offset);
|
| // This method is similar to PushScrollOffsetFromMainThread but will cause the
|
| // scroll offset given to clobber any scroll changes on the active tree in the
|
| @@ -636,7 +626,10 @@ class CC_EXPORT LayerImpl : public LayerAnimationValueObserver,
|
|
|
| private:
|
| void PushScrollOffset(const gfx::ScrollOffset* scroll_offset);
|
| - void DidUpdateScrollOffset();
|
| + // If the new scroll offset is assigned from the root scroll offset delegate,
|
| + // LayerImpl won't inform the root scroll offset delegate about the scroll
|
| + // change to avoid feedback.
|
| + void DidUpdateScrollOffset(bool is_from_root_delegate);
|
| void NoteLayerPropertyChangedForDescendantsInternal();
|
|
|
| virtual const char* LayerTypeAsString() const;
|
| @@ -672,7 +665,6 @@ class CC_EXPORT LayerImpl : public LayerAnimationValueObserver,
|
| // Properties synchronized from the associated Layer.
|
| gfx::Point3F transform_origin_;
|
| gfx::Size bounds_;
|
| - ScrollOffsetDelegate* scroll_offset_delegate_;
|
| LayerImpl* scroll_clip_layer_;
|
| bool scrollable_ : 1;
|
| bool should_scroll_on_main_thread_ : 1;
|
|
|