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

Unified Diff: ui/keyboard/keyboard_layout_manager.cc

Issue 487253003: Keep virtual keyboard visibility the same after enable an IME in a different extension (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: nit and rebase 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 | « ui/keyboard/keyboard_controller.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/keyboard/keyboard_layout_manager.cc
diff --git a/ui/keyboard/keyboard_layout_manager.cc b/ui/keyboard/keyboard_layout_manager.cc
index 9946060cd9668396af686bca34061953533bc39b..c54f78ceeefebd14b5c6f780d55b4c1903122bb2 100644
--- a/ui/keyboard/keyboard_layout_manager.cc
+++ b/ui/keyboard/keyboard_layout_manager.cc
@@ -49,11 +49,11 @@ void KeyboardLayoutManager::SetChildBounds(aura::Window* child,
gfx::Rect old_bounds = child->bounds();
SetChildBoundsDirect(child, requested_bounds);
- if (old_bounds.height() == 0 && child->bounds().height() != 0) {
- // The window height is set to 0 initially. If the height of |old_bounds| is
- // 0 and the new bounds is not 0, it probably means window.resizeTo is
- // called to set the window height. We should try to show keyboard again in
- // case the show keyboard request is called before the height is set.
+ if (old_bounds.height() == 0 && child->bounds().height() != 0 &&
+ controller_->show_on_resize()) {
+ // The window height is set to 0 initially or before switch to an IME in a
+ // different extension. Virtual keyboard window may wait for this bounds
+ // change to correctly animate in.
controller_->ShowKeyboard(false);
} else {
// We need to send out this notification only if keyboard is visible since
« no previous file with comments | « ui/keyboard/keyboard_controller.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698