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

Unified Diff: ui/keyboard/keyboard_controller_proxy.cc

Issue 470193002: Set keyboard height to 0 before show a keyboard in a different extension (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/keyboard/keyboard_controller_proxy.cc
diff --git a/ui/keyboard/keyboard_controller_proxy.cc b/ui/keyboard/keyboard_controller_proxy.cc
index dec2b0f3518ac36b9b13082323217a2f319b645e..097b0d62f1d70b2131b7f36866460aa618137ad1 100644
--- a/ui/keyboard/keyboard_controller_proxy.cc
+++ b/ui/keyboard/keyboard_controller_proxy.cc
@@ -169,6 +169,15 @@ void KeyboardControllerProxy::LoadSystemKeyboard() {
void KeyboardControllerProxy::ReloadKeyboardIfNeeded() {
DCHECK(keyboard_contents_);
if (keyboard_contents_->GetURL() != GetVirtualKeyboardUrl()) {
+ if (keyboard_contents_->GetURL().GetOrigin() !=
+ GetVirtualKeyboardUrl().GetOrigin()) {
+ // Sets keyboard window height to 0 before navigate to a keyboard in a
+ // different extension. This keeps the UX the same as Android.
+ gfx::Rect bounds = GetKeyboardWindow()->bounds();
+ bounds.set_y(bounds.y() + bounds.height());
+ bounds.set_height(0);
+ GetKeyboardWindow()->SetBounds(bounds);
+ }
LoadContents(GetVirtualKeyboardUrl());
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698