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

Unified Diff: content/renderer/render_view_impl_android.cc

Issue 14139013: Hide location bar on Javascript-initiated scroll. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Restore handling of ViewMsg_UpdateTopControlsState in RenderViewImpl. 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: content/renderer/render_view_impl_android.cc
diff --git a/content/renderer/render_view_impl_android.cc b/content/renderer/render_view_impl_android.cc
index 0d5ade1b3f222991ab68c706ac14ba4238996102..2dd83c928c2d8cd014b34246394f062727a5da34 100644
--- a/content/renderer/render_view_impl_android.cc
+++ b/content/renderer/render_view_impl_android.cc
@@ -11,14 +11,29 @@
namespace content {
+// TODO(mvanouwerkerk): Stop calling this code path and delete it.
void RenderViewImpl::OnUpdateTopControlsState(bool enable_hiding,
bool enable_showing,
bool animate) {
// TODO(tedchoc): Investigate why messages are getting here before the
// compositor has been initialized.
LOG_IF(WARNING, !compositor_) << "OnUpdateTopControlsState was unhandled.";
+ if (compositor_) {
+ cc::TopControlsState constraints = cc::BOTH;
+ if (!enable_showing)
+ constraints = cc::HIDDEN;
+ if (!enable_hiding)
+ constraints = cc::SHOWN;
+ cc::TopControlsState current = cc::BOTH;
+ compositor_->UpdateTopControlsState(constraints, current, animate);
+ }
+}
+
+void RenderViewImpl::UpdateTopControlsState(cc::TopControlsState constraints,
+ cc::TopControlsState current,
+ bool animate) {
if (compositor_)
- compositor_->UpdateTopControlsState(enable_hiding, enable_showing, animate);
+ compositor_->UpdateTopControlsState(constraints, current, animate);
}
} // namespace content

Powered by Google App Engine
This is Rietveld 408576698