Chromium Code Reviews| Index: cc/trees/layer_tree_host.cc |
| diff --git a/cc/trees/layer_tree_host.cc b/cc/trees/layer_tree_host.cc |
| index 3bc69bd0db4a4d24bf0e3b70ca896ce7810296bc..0fdc08e837f9bfcbca3220dc077f3223dcc3c8de 100644 |
| --- a/cc/trees/layer_tree_host.cc |
| +++ b/cc/trees/layer_tree_host.cc |
| @@ -1041,6 +1041,7 @@ void LayerTreeHost::UpdateTopControlsState(TopControlsState constraints, |
| if (!settings_.calculate_top_controls_position) |
| return; |
| + top_controls_constraints_ = constraints; |
| // Top controls are only used in threaded mode. |
| proxy_->ImplThread()->PostTask( |
| base::Bind(&TopControlsManager::UpdateTopControlsState, |
| @@ -1050,6 +1051,19 @@ void LayerTreeHost::UpdateTopControlsState(TopControlsState constraints, |
| animate)); |
| } |
| +void LayerTreeHost::UpdateTopControlsStatePreservingConstraints( |
| + TopControlsState current, |
| + bool animate) { |
| + if (!settings_.calculate_top_controls_position) |
| + return; |
| + if (top_controls_constraints_ < 0) |
|
jamesr
2013/06/10 23:48:31
top_controls_constraints_ is an enum. what does "<
Jinsuk Kim
2013/06/11 04:53:18
Added cc::NONE value to the enum list.
|
| + return; |
| + |
| + UpdateTopControlsState(top_controls_constraints_, |
| + current, |
| + animate); |
| +} |
| + |
| bool LayerTreeHost::BlocksPendingCommit() const { |
| if (!root_layer_.get()) |
| return false; |