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

Unified Diff: cc/trees/layer_tree_host.cc

Issue 14999010: Allows fullscreen to be triggered with the key events used for scrolling. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 7 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/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());

Powered by Google App Engine
This is Rietveld 408576698