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

Unified Diff: ui/compositor/layer.h

Issue 2188133002: Scroll with Layers in views::ScrollView (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@20160728-MacViews-ScrollTrack
Patch Set: bugref, scale_delta DCHECK + comment Created 4 years, 4 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 | « ui/compositor/compositor.cc ('k') | ui/compositor/layer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/compositor/layer.h
diff --git a/ui/compositor/layer.h b/ui/compositor/layer.h
index c19e8eab056130dc0e79971abfe0e6b979465510..dc28e09259ed347220dffb0ec2fa61927313c0c6 100644
--- a/ui/compositor/layer.h
+++ b/ui/compositor/layer.h
@@ -355,6 +355,14 @@ class COMPOSITOR_EXPORT Layer
// Requets a copy of the layer's output as a texture or bitmap.
void RequestCopyOfOutput(std::unique_ptr<cc::CopyOutputRequest> request);
+ // Makes this Layer scrollable, clipping to |parent_clip_layer|. |on_scroll|
+ // is invoked when scrolling performed by the cc::InputHandler is committed.
+ void SetScrollable(Layer* parent_clip_layer, const base::Closure& on_scroll);
+
+ // Gets and sets the current scroll offset of the layer.
+ gfx::ScrollOffset CurrentScrollOffset() const;
+ void SetScrollOffset(const gfx::ScrollOffset& offset);
+
// ContentLayerClient
gfx::Rect PaintableRegion() override;
scoped_refptr<cc::DisplayItemList> PaintContentsToDisplayList(
« no previous file with comments | « ui/compositor/compositor.cc ('k') | ui/compositor/layer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698