| Index: ui/keyboard/keyboard_controller.cc
|
| diff --git a/ui/keyboard/keyboard_controller.cc b/ui/keyboard/keyboard_controller.cc
|
| index b34d42756339cea462020550b63038bc0bd8c947..a085c533a2d376cf50ec8b2d1f821aff77c33450 100644
|
| --- a/ui/keyboard/keyboard_controller.cc
|
| +++ b/ui/keyboard/keyboard_controller.cc
|
| @@ -343,8 +343,16 @@ void KeyboardController::SetKeyboardMode(KeyboardMode mode) {
|
| if (keyboard_mode_ == FLOATING) {
|
| NotifyKeyboardBoundsChanging(gfx::Rect());
|
| } else if (keyboard_mode_ == FULL_WIDTH) {
|
| - // TODO(bshe): handle switch to FULL_WIDTH from FLOATING mode. We need a way
|
| - // to know the height of virtual keyboard in FULL_WIDTH mode before here.
|
| + // TODO(bshe): revisit this logic after we decide to support resize virtual
|
| + // keyboard.
|
| + int keyboard_height = GetContainerWindow()->bounds().height();
|
| + const gfx::Rect& root_bounds = container_->GetRootWindow()->bounds();
|
| + gfx::Rect new_bounds = root_bounds;
|
| + new_bounds.set_y(root_bounds.height() - keyboard_height);
|
| + new_bounds.set_height(keyboard_height);
|
| + GetContainerWindow()->SetBounds(new_bounds);
|
| + // No animation added, so call ShowAnimationFinished immediately.
|
| + ShowAnimationFinished();
|
| }
|
| }
|
|
|
|
|