| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "ui/keyboard/keyboard_layout_manager.h" | 5 #include "ui/keyboard/keyboard_layout_manager.h" |
| 6 | 6 |
| 7 #include "ui/compositor/layer_animator.h" | 7 #include "ui/compositor/layer_animator.h" |
| 8 #include "ui/keyboard/keyboard_controller.h" | 8 #include "ui/keyboard/keyboard_controller.h" |
| 9 #include "ui/keyboard/keyboard_util.h" | 9 #include "ui/keyboard/keyboard_util.h" |
| 10 | 10 |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 animator->StopAnimating(); | 74 animator->StopAnimating(); |
| 75 | 75 |
| 76 controller_->GetContainerWindow()->SetBounds(new_bounds); | 76 controller_->GetContainerWindow()->SetBounds(new_bounds); |
| 77 SetChildBoundsDirect(keyboard_, gfx::Rect(new_bounds.size())); | 77 SetChildBoundsDirect(keyboard_, gfx::Rect(new_bounds.size())); |
| 78 | 78 |
| 79 if (old_bounds.height() == 0 && child->bounds().height() != 0 && | 79 if (old_bounds.height() == 0 && child->bounds().height() != 0 && |
| 80 controller_->show_on_resize()) { | 80 controller_->show_on_resize()) { |
| 81 // The window height is set to 0 initially or before switch to an IME in a | 81 // The window height is set to 0 initially or before switch to an IME in a |
| 82 // different extension. Virtual keyboard window may wait for this bounds | 82 // different extension. Virtual keyboard window may wait for this bounds |
| 83 // change to correctly animate in. | 83 // change to correctly animate in. |
| 84 controller_->ShowKeyboard(false); | 84 controller_->ShowKeyboard(controller_->keyboard_locked()); |
| 85 } else { | 85 } else { |
| 86 if (controller_->keyboard_mode() == FULL_WIDTH) { | 86 if (controller_->keyboard_mode() == FULL_WIDTH) { |
| 87 // We need to send out this notification only if keyboard is visible since | 87 // We need to send out this notification only if keyboard is visible since |
| 88 // keyboard window is resized even if keyboard is hidden. | 88 // keyboard window is resized even if keyboard is hidden. |
| 89 if (controller_->keyboard_visible()) | 89 if (controller_->keyboard_visible()) |
| 90 controller_->NotifyKeyboardBoundsChanging(requested_bounds); | 90 controller_->NotifyKeyboardBoundsChanging(requested_bounds); |
| 91 } else if (controller_->keyboard_mode() == FLOATING) { | 91 } else if (controller_->keyboard_mode() == FLOATING) { |
| 92 controller_->NotifyKeyboardBoundsChanging(gfx::Rect()); | 92 controller_->NotifyKeyboardBoundsChanging(gfx::Rect()); |
| 93 } | 93 } |
| 94 } | 94 } |
| 95 } | 95 } |
| 96 | 96 |
| 97 } // namespace keyboard | 97 } // namespace keyboard |
| OLD | NEW |