summaryrefslogtreecommitdiffstats
path: root/ui/keyboard
diff options
context:
space:
mode:
authorkevers@chromium.org <kevers@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-05-07 19:53:46 +0000
committerkevers@chromium.org <kevers@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-05-07 19:53:46 +0000
commit20dae011bacebf4d70d0bf44cb606027695ce699 (patch)
treee5a2aa63c1ee0feaf6fc128ed9a3c8b16c752fe0 /ui/keyboard
parent2d7d80d847ac1fb32583930ad3c255c2d8031391 (diff)
downloadchromium_src-20dae011bacebf4d70d0bf44cb606027695ce699.zip
chromium_src-20dae011bacebf4d70d0bf44cb606027695ce699.tar.gz
chromium_src-20dae011bacebf4d70d0bf44cb606027695ce699.tar.bz2
Reset insets when existing touchview mode.
BUG=370090 Review URL: https://codereview.chromium.org/266883008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@268904 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/keyboard')
-rw-r--r--ui/keyboard/keyboard_controller.cc12
-rw-r--r--ui/keyboard/keyboard_controller.h3
2 files changed, 15 insertions, 0 deletions
diff --git a/ui/keyboard/keyboard_controller.cc b/ui/keyboard/keyboard_controller.cc
index 1d84b50..0a2fd1f 100644
--- a/ui/keyboard/keyboard_controller.cc
+++ b/ui/keyboard/keyboard_controller.cc
@@ -201,6 +201,7 @@ KeyboardController::~KeyboardController() {
container_->RemoveObserver(this);
if (input_method_)
input_method_->RemoveObserver(this);
+ ResetWindowInsets();
}
// static
@@ -438,6 +439,17 @@ void KeyboardController::ShowKeyboardInternal() {
}
}
+void KeyboardController::ResetWindowInsets() {
+ const gfx::Insets insets;
+ scoped_ptr<content::RenderWidgetHostIterator> widgets(
+ content::RenderWidgetHost::GetRenderWidgetHosts());
+ while (content::RenderWidgetHost* widget = widgets->GetNextHost()) {
+ content::RenderWidgetHostView* view = widget->GetView();
+ if (view)
+ view->SetInsets(insets);
+ }
+}
+
bool KeyboardController::WillHideKeyboard() const {
return weak_factory_.HasWeakPtrs();
}
diff --git a/ui/keyboard/keyboard_controller.h b/ui/keyboard/keyboard_controller.h
index 2eb6653..7bd8e2f 100644
--- a/ui/keyboard/keyboard_controller.h
+++ b/ui/keyboard/keyboard_controller.h
@@ -122,6 +122,9 @@ class KEYBOARD_EXPORT KeyboardController : public ui::InputMethodObserver,
// Show virtual keyboard immediately with animation.
void ShowKeyboardInternal();
+ // Clears any insets on web content windows.
+ void ResetWindowInsets();
+
// Returns true if keyboard is scheduled to hide.
bool WillHideKeyboard() const;