Index: cc/trees/layer_tree_host.cc |
diff --git a/cc/trees/layer_tree_host.cc b/cc/trees/layer_tree_host.cc |
index 7b0972645a5a0157c49564324626a6dd5b7dfbbd..50d58e8a68b6b1d2a729ea1d5a2acccb33931798 100644 |
--- a/cc/trees/layer_tree_host.cc |
+++ b/cc/trees/layer_tree_host.cc |
@@ -492,6 +492,18 @@ scoped_ptr<LayerTreeHostImpl> LayerTreeHost::CreateLayerTreeHostImpl( |
return host_impl.Pass(); |
} |
+void LayerTreeHost::ShowTopControls(bool show) { |
+ top_controls_manager_weak_ptr_->ScrollBegin(); |
aelias_OOO_until_Jul13
2013/05/21 05:51:41
This isn't thread-safe. LayerTreeHost functions a
Jinsuk Kim
2013/05/24 09:57:13
Done. Instead of keeping an additional copy I adde
|
+ gfx::Vector2dF delta(0.f, show ? -settings_.top_controls_height |
+ : settings_.top_controls_height); |
+ top_controls_manager_weak_ptr_->ScrollBy(delta); |
+ top_controls_manager_weak_ptr_->ScrollEnd(); |
+} |
+ |
+float LayerTreeHost::GetTopControlsOffset() { |
+ return top_controls_manager_weak_ptr_->controls_top_offset(); |
aelias_OOO_until_Jul13
2013/05/21 05:51:41
Not thread-safe either. I don't think you really
Jinsuk Kim
2013/05/24 09:57:13
Right. removed.
|
+} |
+ |
void LayerTreeHost::DidLoseOutputSurface() { |
TRACE_EVENT0("cc", "LayerTreeHost::DidLoseOutputSurface"); |
DCHECK(proxy_->IsMainThread()); |