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

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: Route requestHideTopControls through browser. 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 a0ea636c72fdfaee4b7f13310c9788b036bfb4ff..d13585d67f6aeeea0ac1fa798951a539689fa770 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) {
John Knottenbelt 2013/03/25 15:29:48 c++ indenting instead of java style
+ if (show) {
+ if (controls_top_offset_ == 0)
+ return;
+ SetupAnimation(SHOWING_CONTROLS);
+ } else {
+ DCHECK(enable_hiding_);
+ if (controls_top_offset_ == -top_controls_height_)
+ return;
+ SetupAnimation(HIDING_CONTROLS);
+ }
+}
+
void TopControlsManager::ScrollBegin() {
ResetAnimations();
current_scroll_delta_ = 0.f;

Powered by Google App Engine
This is Rietveld 408576698