Index: ui/keyboard/keyboard_controller.cc |
diff --git a/ui/keyboard/keyboard_controller.cc b/ui/keyboard/keyboard_controller.cc |
index 4dd085c6e05b33fd1b3c8d3609c8a41972008867..1c02f527881637121b8d8088e9376dfac51598c6 100644 |
--- a/ui/keyboard/keyboard_controller.cc |
+++ b/ui/keyboard/keyboard_controller.cc |
@@ -6,6 +6,9 @@ |
#include "base/bind.h" |
#include "base/command_line.h" |
+#include "content/public/browser/render_widget_host.h" |
+#include "content/public/browser/render_widget_host_iterator.h" |
+#include "content/public/browser/render_widget_host_view.h" |
#include "ui/aura/window.h" |
#include "ui/aura/window_delegate.h" |
#include "ui/base/cursor/cursor.h" |
@@ -234,6 +237,21 @@ void KeyboardController::NotifyKeyboardBoundsChanging( |
FOR_EACH_OBSERVER(KeyboardControllerObserver, |
observer_list_, |
OnKeyboardBoundsChanging(new_bounds)); |
+ if (keyboard::IsKeyboardOverscrollEnabled()) { |
+ // Adjust the height of the viewport for visible windows on the primary |
+ // display. |
+ scoped_ptr<content::RenderWidgetHostIterator> widgets( |
+ content::RenderWidgetHost::GetRenderWidgetHosts()); |
+ aura::Window *keyboard_window = proxy_->GetKeyboardWindow(); |
+ aura::Window *root_window = keyboard_window->GetRootWindow(); |
+ gfx::Insets insets(0, 0, new_bounds.height(), 0); |
+ while (content::RenderWidgetHost* widget = widgets->GetNextHost()) { |
+ content::RenderWidgetHostView* view = widget->GetView(); |
+ aura::Window *window = view->GetNativeView(); |
+ if (window != keyboard_window && window->GetRootWindow() == root_window) |
+ view->SetInsets(insets); |
+ } |
+ } |
} |
} |