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

Unified Diff: cc/input/top_controls_manager.cc

Issue 11967015: Hide location bar on WebKit programmatic scroll. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix nit. Created 7 years, 9 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/input/top_controls_manager.cc
diff --git a/cc/input/top_controls_manager.cc b/cc/input/top_controls_manager.cc
index e1698f1316cbd626d7a500ca81ae2cd273b10131..ae3cf7450e53354c0a5369c43c6ce51797735c3c 100644
--- a/cc/input/top_controls_manager.cc
+++ b/cc/input/top_controls_manager.cc
@@ -67,6 +67,19 @@ void TopControlsManager::EnableHidingTopControls(bool enable) {
}
}
+void TopControlsManager::ShowTopControls(bool show) {
+ if (show) {
+ if (controls_top_offset_ == 0)
aelias_OOO_until_Jul13 2013/03/25 22:35:44 Please add these two early outs to SetupAnimation
John Knottenbelt 2013/03/26 14:49:17 Done.
+ return;
+ SetupAnimation(SHOWING_CONTROLS);
+ } else {
+ DCHECK(enable_hiding_);
+ if (controls_top_offset_ == -top_controls_height_)
+ return;
+ SetupAnimation(HIDING_CONTROLS);
+ }
aelias_OOO_until_Jul13 2013/03/25 22:35:44 Looks like you're missing a client_->setNeedsRedra
John Knottenbelt 2013/03/26 14:49:17 Done.
+}
+
void TopControlsManager::ScrollBegin() {
ResetAnimations();
current_scroll_delta_ = 0.f;

Powered by Google App Engine
This is Rietveld 408576698