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

Unified Diff: ui/keyboard/keyboard_layout_manager.cc

Issue 1508303003: Show floating VK on first tap (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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_unittest.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 2af87773366bd575fec7b8dd3008971af7ff2821..fa5f76329cf87f791a70bce29997f68ff4e9e0b0 100644
--- a/ui/keyboard/keyboard_layout_manager.cc
+++ b/ui/keyboard/keyboard_layout_manager.cc
@@ -70,21 +70,21 @@ void KeyboardLayoutManager::SetChildBounds(aura::Window* child,
controller_->GetContainerWindow()->SetBounds(new_bounds);
SetChildBoundsDirect(keyboard_, gfx::Rect(new_bounds.size()));
- if (controller_->keyboard_mode() == FULL_WIDTH) {
- 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 {
+ 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 {
+ if (controller_->keyboard_mode() == FULL_WIDTH) {
// We need to send out this notification only if keyboard is visible since
// keyboard window is resized even if keyboard is hidden.
if (controller_->keyboard_visible())
controller_->NotifyKeyboardBoundsChanging(requested_bounds);
+ } else if (controller_->keyboard_mode() == FLOATING) {
+ controller_->NotifyKeyboardBoundsChanging(gfx::Rect());
}
- } else if (controller_->keyboard_mode() == FLOATING) {
- controller_->NotifyKeyboardBoundsChanging(gfx::Rect());
}
}
« no previous file with comments | « ui/keyboard/keyboard_controller_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698