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

Unified Diff: content/browser/renderer_host/render_widget_host_view_aura.cc

Issue 195793004: Implement overscroll support for the virtual keyboard. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix unittest. Created 6 years, 8 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/browser/renderer_host/render_widget_host_view_aura.cc
diff --git a/content/browser/renderer_host/render_widget_host_view_aura.cc b/content/browser/renderer_host/render_widget_host_view_aura.cc
index ad374246f96ac5d750fb9703868bb584f8262ff5..f324aa83ab5420b553b525812068603c12493901 100644
--- a/content/browser/renderer_host/render_widget_host_view_aura.cc
+++ b/content/browser/renderer_host/render_widget_host_view_aura.cc
@@ -875,6 +875,21 @@ void RenderWidgetHostViewAura::SetBackground(const SkBitmap& background) {
window_->layer()->SetFillsBoundsOpaquely(background.isOpaque());
}
+gfx::Size RenderWidgetHostViewAura::GetVisibleViewportSize() const {
+ gfx::Rect window_bounds = window_->GetBoundsInScreen();
sky 2014/04/24 19:15:01 GetBoundsInScreen()->bounds()
kevers 2014/04/24 20:09:00 Done.
+ int viewport_width = window_bounds.width() - insets_.left() - insets_.right();
sky 2014/04/24 19:15:01 std::max(0, ...) for both of these lines?
kevers 2014/04/24 20:09:00 Done.
+ int viewport_height = window_bounds.height() - insets_.top() -
+ insets_.bottom();
+ return gfx::Size(viewport_width, viewport_height);
+}
+
+void RenderWidgetHostViewAura::SetInsets(const gfx::Insets& insets) {
+ if (insets != insets_) {
+ insets_ = insets;
+ host_->WasResized();
+ }
+}
+
void RenderWidgetHostViewAura::UpdateCursor(const WebCursor& cursor) {
current_cursor_ = cursor;
const gfx::Display display = gfx::Screen::GetScreenFor(window_)->

Powered by Google App Engine
This is Rietveld 408576698