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

Unified Diff: cc/trees/layer_tree_impl.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_impl.h ('k') | chrome/android/java/src/org/chromium/chrome/browser/tab/Tab.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_impl.cc
diff --git a/cc/trees/layer_tree_impl.cc b/cc/trees/layer_tree_impl.cc
index 3690866e0431dfd8fcea5dfaafd33cb8fed7a61d..ad25a4cd0c589daed7d6065dff13570f1e9c4861 100644
--- a/cc/trees/layer_tree_impl.cc
+++ b/cc/trees/layer_tree_impl.cc
@@ -85,6 +85,7 @@ LayerTreeImpl::LayerTreeImpl(
event_listener_properties_(),
top_controls_shrink_blink_size_(false),
top_controls_height_(0),
+ bottom_controls_height_(0),
top_controls_shown_ratio_(top_controls_shown_ratio) {
property_trees()->is_main_thread = false;
}
@@ -431,6 +432,7 @@ void LayerTreeImpl::PushPropertiesTo(LayerTreeImpl* target_tree) {
target_tree->set_top_controls_shrink_blink_size(
top_controls_shrink_blink_size_);
target_tree->set_top_controls_height(top_controls_height_);
+ target_tree->set_bottom_controls_height(bottom_controls_height_);
target_tree->PushTopControls(nullptr);
// Active tree already shares the page_scale_factor object with pending
@@ -771,6 +773,15 @@ void LayerTreeImpl::set_top_controls_height(float top_controls_height) {
layer_tree_host_impl_->UpdateViewportContainerSizes();
}
+void LayerTreeImpl::set_bottom_controls_height(float bottom_controls_height) {
+ if (bottom_controls_height_ == bottom_controls_height)
+ return;
+
+ bottom_controls_height_ = bottom_controls_height;
+ if (IsActiveTree())
+ layer_tree_host_impl_->UpdateViewportContainerSizes();
+}
+
bool LayerTreeImpl::ClampTopControlsShownRatio() {
float ratio = top_controls_shown_ratio_->Current(true);
ratio = std::max(ratio, 0.f);
« no previous file with comments | « cc/trees/layer_tree_impl.h ('k') | chrome/android/java/src/org/chromium/chrome/browser/tab/Tab.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698