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

Unified Diff: cc/layers/viewport.h

Issue 2388563002: Clean up viewport scrolling methods in CC (Closed)
Patch Set: Fix tests Created 4 years, 2 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/input_handler.h ('k') | cc/layers/viewport.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/viewport.h
diff --git a/cc/layers/viewport.h b/cc/layers/viewport.h
index 4b7d23543710f73ac3f08a5de66910cb8fcb0003..f8312fa61b057417fac97e43acf7c1895a6357bf 100644
--- a/cc/layers/viewport.h
+++ b/cc/layers/viewport.h
@@ -48,6 +48,11 @@ class CC_EXPORT Viewport {
bool is_wheel_scroll,
bool affect_top_controls);
+ // Scrolls the viewport. Unlike the above method, scrolls the inner before
+ // the outer viewport. Doesn't affect top controls or return a result since
+ // callers don't need it.
+ void ScrollByInnerFirst(const gfx::Vector2dF& delta);
+
// Scrolls the viewport, bubbling the delta between the inner and outer
// viewport. Only animates either of the two viewports.
gfx::Vector2dF ScrollAnimated(const gfx::Vector2dF& delta,
@@ -56,6 +61,11 @@ class CC_EXPORT Viewport {
void PinchUpdate(float magnify_delta, const gfx::Point& anchor);
void PinchEnd();
+ // Returns the "representative" viewport layer. That is, the one that's set
+ // as the currently scrolling layer when the viewport scrolls and the one used
+ // in the scrolling code to indicate scrolling should happen via this class.
+ LayerImpl* MainScrollLayer() const;
+
private:
explicit Viewport(LayerTreeHostImpl* host_impl);
« no previous file with comments | « cc/input/input_handler.h ('k') | cc/layers/viewport.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698