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 "ash/wm/virtual_keyboard_container_layout_manager.h" | 5 #include "ash/wm/virtual_keyboard_container_layout_manager.h" |
6 | 6 |
7 #include "ash/shell_window_ids.h" | 7 #include "ash/shell_window_ids.h" |
8 #include "ui/aura/window.h" | 8 #include "ui/aura/window.h" |
9 #include "ui/keyboard/keyboard_controller.h" | 9 #include "ui/keyboard/keyboard_controller.h" |
10 | 10 |
(...skipping 13 matching lines...) Expand all Loading... | |
24 | 24 |
25 //////////////////////////////////////////////////////////////////////////////// | 25 //////////////////////////////////////////////////////////////////////////////// |
26 // VirtualKeyboardContainerLayoutManager, aura::LayoutManager implementation: | 26 // VirtualKeyboardContainerLayoutManager, aura::LayoutManager implementation: |
27 | 27 |
28 void VirtualKeyboardContainerLayoutManager::OnWindowResized() { | 28 void VirtualKeyboardContainerLayoutManager::OnWindowResized() { |
29 keyboard::KeyboardController* keyboard_controller = | 29 keyboard::KeyboardController* keyboard_controller = |
30 keyboard::KeyboardController::GetInstance(); | 30 keyboard::KeyboardController::GetInstance(); |
31 if (!keyboard_controller) | 31 if (!keyboard_controller) |
32 return; | 32 return; |
33 | 33 |
34 // The layout manager for the root window propagates a resize to its | 34 if (keyboard_controller->keyboard_container_initialized()) |
35 // immediate children and grandchildren, but stops there. The keyboard | 35 keyboard_controller->OnRootWindowResized(parent_container_->bounds()); |
36 // container is three levels deep, and therefore needs to be explicitly | |
37 // updated when its parent is resized. | |
38 aura::Window* keyboard_container = | |
39 keyboard_controller->GetContainerWindow(); | |
40 if (keyboard_container) | |
41 keyboard_container->SetBounds(parent_container_->bounds()); | |
42 } | 36 } |
43 | 37 |
44 } // namespace ash | 38 } // namespace ash |
sadrul
2015/04/01 06:43:48
Is this layout-manager necessary at all? KeyboardC
bshe
2015/04/01 20:41:33
Looks like we dont need it. I removed the layout m
| |
OLD | NEW |