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

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: Addressed comments Created 7 years, 6 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 3bc69bd0db4a4d24bf0e3b70ca896ce7810296bc..8c0733e2fb7f32d95f5719cd8026ff516b0b9306 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,23 @@ void LayerTreeHost::UpdateTopControlsState(TopControlsState constraints,
animate));
}
+void LayerTreeHost::UpdateTopControlsStatePreservingConstraints(
+ bool show) {
+ if (!settings_.calculate_top_controls_position)
+ return;
+ if (GetTopControlsConstraints() < 0) {
+ LOG(WARNING) << "Called before top controls constraints is set";
aelias_OOO_until_Jul13 2013/06/10 05:11:25 Please remove this log, nobody will ever pay atten
Jinsuk Kim 2013/06/10 05:37:09 Done.
+ return;
+ }
+ proxy_->ImplThread()->PostTask(
aelias_OOO_until_Jul13 2013/06/10 05:11:25 Please call LayerTreeHost::UpdateTopControlsState(
Jinsuk Kim 2013/06/10 05:37:09 Done.
+ base::Bind(
+ &TopControlsManager::UpdateTopControlsState,
+ top_controls_manager_weak_ptr_,
+ GetTopControlsConstraints(),
+ show ? cc::SHOWN : cc::HIDDEN,
+ true));
+}
+
bool LayerTreeHost::BlocksPendingCommit() const {
if (!root_layer_.get())
return false;

Powered by Google App Engine
This is Rietveld 408576698