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

Unified Diff: content/renderer/render_view_impl_android.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: move the decl into the right place 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
« no previous file with comments | « content/renderer/render_view_impl.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1742eac997e6e435d0e081e6aceac1349c27b0e9..5a05278ecd7bbbb0f73e3e1894372f1dfb3d6c2d 100644
--- a/content/renderer/render_view_impl_android.cc
+++ b/content/renderer/render_view_impl_android.cc
@@ -36,6 +36,7 @@ void RenderViewImpl::OnUpdateTopControlsState(bool enable_hiding,
constraints = cc::SHOWN;
cc::TopControlsState current = cc::BOTH;
compositor_->UpdateTopControlsState(constraints, current, animate);
+ top_controls_constraints_ = constraints;
}
}
@@ -47,6 +48,18 @@ void RenderViewImpl::UpdateTopControlsState(TopControlsState constraints,
cc::TopControlsState current_cc = ContentToCcTopControlsState(current);
if (compositor_)
compositor_->UpdateTopControlsState(constraints_cc, current_cc, animate);
+ top_controls_constraints_ = constraints_cc;
+}
+
+void RenderViewImpl::didScrollWithKeyboard(const WebKit::WebSize& delta) {
+ if (delta.height == 0)
+ return;
+ if (compositor_) {
+ cc::TopControlsState current = delta.height < 0 ? cc::SHOWN : cc::HIDDEN;
+ compositor_->UpdateTopControlsState(top_controls_constraints_,
+ current,
+ true);
+ }
}
} // namespace content
« no previous file with comments | « content/renderer/render_view_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698