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

Side by Side Diff: ui/keyboard/keyboard_layout_manager.cc

Issue 528043002: Fix stale keyboard bounds on login screen (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2125
Patch Set: Created 6 years, 3 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 unified diff | Download patch
« no previous file with comments | « ui/keyboard/keyboard_controller.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_controller_proxy.h" 9 #include "ui/keyboard/keyboard_controller_proxy.h"
10 #include "ui/keyboard/keyboard_util.h" 10 #include "ui/keyboard/keyboard_util.h"
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 49
50 gfx::Rect old_bounds = child->bounds(); 50 gfx::Rect old_bounds = child->bounds();
51 SetChildBoundsDirect(child, requested_bounds); 51 SetChildBoundsDirect(child, requested_bounds);
52 if (old_bounds.height() == 0 && child->bounds().height() != 0) { 52 if (old_bounds.height() == 0 && child->bounds().height() != 0) {
53 // The window height is set to 0 initially. If the height of |old_bounds| is 53 // The window height is set to 0 initially. If the height of |old_bounds| is
54 // 0 and the new bounds is not 0, it probably means window.resizeTo is 54 // 0 and the new bounds is not 0, it probably means window.resizeTo is
55 // called to set the window height. We should try to show keyboard again in 55 // called to set the window height. We should try to show keyboard again in
56 // case the show keyboard request is called before the height is set. 56 // case the show keyboard request is called before the height is set.
57 controller_->ShowKeyboard(false); 57 controller_->ShowKeyboard(false);
58 } else { 58 } else {
59 controller_->NotifyKeyboardBoundsChanging(requested_bounds); 59 // We need to send out this notification only if keyboard is visible since
60 // keyboard window is resized even if keyboard is hidden.
61 if (controller_->keyboard_visible())
62 controller_->NotifyKeyboardBoundsChanging(requested_bounds);
60 } 63 }
61 } 64 }
62 65
63 } // namespace keyboard 66 } // namespace keyboard
OLDNEW
« 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