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

Unified Diff: cc/trees/layer_tree_host.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: content-offset -> top-controls-shown renaming and respond to bokan's comments Created 4 years, 6 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: cc/trees/layer_tree_host.cc
diff --git a/cc/trees/layer_tree_host.cc b/cc/trees/layer_tree_host.cc
index 7651d0305dec6d919874fa6380b0de1110007eaf..8d562ae31244835270086051e53f555c3a28e71b 100644
--- a/cc/trees/layer_tree_host.cc
+++ b/cc/trees/layer_tree_host.cc
@@ -519,6 +519,7 @@ void LayerTreeHost::FinishCommitOnImplThread(LayerTreeHostImpl* host_impl) {
sync_tree->set_top_controls_shrink_blink_size(
top_controls_shrink_blink_size_);
sync_tree->set_top_controls_height(top_controls_height_);
+ sync_tree->set_bottom_controls_height(bottom_controls_height_);
sync_tree->PushTopControlsFromMainThread(top_controls_shown_ratio_);
host_impl->SetHasGpuRasterizationTrigger(has_gpu_rasterization_trigger_);
@@ -834,6 +835,14 @@ void LayerTreeHost::SetTopControlsShownRatio(float ratio) {
SetNeedsCommit();
}
+void LayerTreeHost::setBottomControlHeight(float height) {
+ if (bottom_controls_height_ == height)
+ return;
+
+ bottom_controls_height_ = height;
+ SetNeedsCommit();
+}
+
void LayerTreeHost::ApplyPageScaleDeltaFromImplSide(float page_scale_delta) {
DCHECK(CommitRequested());
if (page_scale_delta == 1.f)

Powered by Google App Engine
This is Rietveld 408576698