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

Unified Diff: ui/compositor/compositor.h

Issue 2189583004: [not for review - epic CL] Adding Elastic+Momentum+Layered scrolling to views::ScrollView Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Combined rebase Created 4 years, 5 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..4a6edc691b0c4c305c1dbe3487c43b6cc7d5dc29 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;
}
@@ -66,6 +67,7 @@ class CompositorVSyncManager;
class LatencyInfo;
class Layer;
class Reflector;
+class UIScrollInputManager;
class Texture;
const int kCompositorLockTimeoutMs = 67;
@@ -266,6 +268,11 @@ class COMPOSITOR_EXPORT Compositor
// Gets the visibility of the underlying compositor.
bool IsVisible();
+ // Gets/Sets the scroll offset for the given layer in step with the
+ // cc::InputHandler.
+ gfx::ScrollOffset GetScrollOffsetForLayer(int layer_id) 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.
@@ -364,6 +371,10 @@ class COMPOSITOR_EXPORT Compositor
return surface_id_allocator_.get();
}
+ UIScrollInputManager* scroll_input_manager() {
+ return scroll_input_manager_.get();
+ }
+
private:
friend class base::RefCounted<Compositor>;
friend class CompositorLock;
@@ -406,6 +417,8 @@ class COMPOSITOR_EXPORT Compositor
LayerAnimatorCollection layer_animator_collection_;
scoped_refptr<cc::AnimationTimeline> animation_timeline_;
+ std::unique_ptr<UIScrollInputManager> scroll_input_manager_;
+
base::WeakPtrFactory<Compositor> weak_ptr_factory_;
DISALLOW_COPY_AND_ASSIGN(Compositor);
« no previous file with comments | « ui/compositor/BUILD.gn ('k') | ui/compositor/compositor.cc » ('j') | ui/events/event_constants.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698