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

Unified Diff: cc/trees/layer_tree.cc

Issue 2106753004: Introduce bottom controls to CC and let it respond to scrolling (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: findbug 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 | « cc/trees/layer_tree.h ('k') | cc/trees/layer_tree_host_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree.cc
diff --git a/cc/trees/layer_tree.cc b/cc/trees/layer_tree.cc
index bbce951aad05cb2fc36f68a1d837122922e7c027..60718316f285ca9c3d478c1599db64b3788bae56 100644
--- a/cc/trees/layer_tree.cc
+++ b/cc/trees/layer_tree.cc
@@ -45,6 +45,7 @@ LayerTree::Inputs::Inputs()
: top_controls_height(0.f),
top_controls_shown_ratio(0.f),
top_controls_shrink_blink_size(false),
+ bottom_controls_height(0.f),
device_scale_factor(1.f),
painted_device_scale_factor(1.f),
page_scale_factor(1.f),
@@ -173,6 +174,14 @@ void LayerTree::SetTopControlsShownRatio(float ratio) {
SetNeedsCommit();
}
+void LayerTree::SetBottomControlsHeight(float height) {
+ if (inputs_.bottom_controls_height == height)
+ return;
+
+ inputs_.bottom_controls_height = height;
+ SetNeedsCommit();
+}
+
void LayerTree::SetPageScaleFactorAndLimits(float page_scale_factor,
float min_page_scale_factor,
float max_page_scale_factor) {
@@ -384,6 +393,7 @@ void LayerTree::PushPropertiesTo(LayerTreeImpl* tree_impl) {
tree_impl->set_top_controls_shrink_blink_size(
inputs_.top_controls_shrink_blink_size);
tree_impl->set_top_controls_height(inputs_.top_controls_height);
+ tree_impl->set_bottom_controls_height(inputs_.bottom_controls_height);
tree_impl->PushTopControlsFromMainThread(inputs_.top_controls_shown_ratio);
tree_impl->elastic_overscroll()->PushFromMainThread(elastic_overscroll_);
if (tree_impl->IsActiveTree())
« no previous file with comments | « cc/trees/layer_tree.h ('k') | cc/trees/layer_tree_host_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698