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

Unified Diff: cc/trees/layer_tree_host_impl.h

Issue 1680613002: Adding momentum/overscroll to views:: ScrollViews Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix Tableview layout. aaaand I think we are done 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
« no previous file with comments | « cc/trees/layer_tree_host_common_unittest.cc ('k') | cc/trees/layer_tree_host_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_host_impl.h
diff --git a/cc/trees/layer_tree_host_impl.h b/cc/trees/layer_tree_host_impl.h
index 0870291de8104482be4cb8a6307652b1bc1c7434..f0175ec3447ac8fccf36f3aed649e5fea5b0ce87 100644
--- a/cc/trees/layer_tree_host_impl.h
+++ b/cc/trees/layer_tree_host_impl.h
@@ -201,7 +201,10 @@ class CC_EXPORT LayerTreeHostImpl
bool DoTouchEventsBlockScrollAt(const gfx::Point& viewport_port) override;
std::unique_ptr<SwapPromiseMonitor> CreateLatencyInfoSwapPromiseMonitor(
ui::LatencyInfo* latency) override;
- ScrollElasticityHelper* CreateScrollElasticityHelper() override;
+ ScrollElasticityHelper* CreateRootScrollElasticityHelper() override;
+ base::WeakPtr<ScrollElasticityHelper>
+ ScrollElasticityHelperForScrollingLayer() override;
+ bool ScrollLayerTo(int layer_id, const gfx::ScrollOffset& offset) override;
// TopControlsManagerClient implementation.
float TopControlsHeight() const override;
@@ -327,6 +330,10 @@ class CC_EXPORT LayerTreeHostImpl
ScrollbarAnimationController* ScrollbarAnimationControllerForId(
int scroll_layer_id) const;
+ void RegisterScrollElasticityHelper(int scroll_layer_id);
+ void UnregisterScrollElasticityHelper(int scroll_layer_id);
+ ScrollElasticityHelper* ScrollElasticityHelperForId(int scroll_layer_id);
+
DrawMode GetDrawMode() const;
// Viewport size in draw space: this size is in physical pixels and is used
@@ -770,7 +777,7 @@ class CC_EXPORT LayerTreeHostImpl
// An object to implement the ScrollElasticityHelper interface and
// hold all state related to elasticity. May be NULL if never requested.
- std::unique_ptr<ScrollElasticityHelper> scroll_elasticity_helper_;
+ std::unique_ptr<ScrollElasticityHelper> root_scroll_elasticity_helper_;
bool tile_priorities_dirty_;
@@ -830,6 +837,10 @@ class CC_EXPORT LayerTreeHostImpl
std::unordered_map<int, std::unique_ptr<ScrollbarAnimationController>>
scrollbar_animation_controllers_;
+ // Map from scroll layer ID to elasticity helper.
+ std::unordered_map<int, std::unique_ptr<ScrollElasticityHelper>>
+ scroll_elasticity_helpers_;
+
RenderingStatsInstrumentation* rendering_stats_instrumentation_;
MicroBenchmarkControllerImpl micro_benchmark_controller_;
std::unique_ptr<SynchronousTaskGraphRunner>
« no previous file with comments | « cc/trees/layer_tree_host_common_unittest.cc ('k') | cc/trees/layer_tree_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698