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

Unified Diff: cc/layers/layer_impl.h

Issue 256303006: Make LayerScrollOffsetDelegate updates consistent. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 7 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/input/layer_scroll_offset_delegate.h ('k') | cc/layers/layer_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « cc/input/layer_scroll_offset_delegate.h ('k') | cc/layers/layer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698