Chromium Code Reviews| 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; |