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

Unified Diff: ui/compositor/compositor.h

Issue 2188133002: Scroll with Layers in views::ScrollView (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@20160728-MacViews-ScrollTrack
Patch Set: Add a test for the transform goop 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
Index: ui/compositor/compositor.h
diff --git a/ui/compositor/compositor.h b/ui/compositor/compositor.h
index 1fa1bfc02a3efd96cd86b8c0edb6b93bcfbf27b8..252ca2d4371189b47ea08e4f70a3f4291aaa8864 100644
--- a/ui/compositor/compositor.h
+++ b/ui/compositor/compositor.h
@@ -51,6 +51,7 @@ class TaskGraphRunner;
namespace gfx {
class Rect;
+class ScrollOffset;
class Size;
}
@@ -266,6 +267,11 @@ class COMPOSITOR_EXPORT Compositor
// Gets the visibility of the underlying compositor.
bool IsVisible();
+ // Gets or sets the scroll offset for the given layer in step with the
+ // cc::InputHandler. Returns true if the layer is active on the impl side.
+ bool GetScrollOffsetForLayer(int layer_id, gfx::ScrollOffset* offset) const;
+ bool ScrollLayerTo(int layer_id, const gfx::ScrollOffset& offset);
+
// The "authoritative" vsync interval, if provided, will override interval
// reported from 3D context. This is typically the value reported by a more
// reliable source, e.g, the platform display configuration.

Powered by Google App Engine
This is Rietveld 408576698