| 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/always_on_top_controller.h" | 5 #include "ash/wm/always_on_top_controller.h" |
| 6 | 6 |
| 7 #include "ash/root_window_controller.h" | 7 #include "ash/root_window_controller.h" |
| 8 #include "ash/shell.h" | 8 #include "ash/shell.h" |
| 9 #include "ash/shell_window_ids.h" | 9 #include "ash/shell_window_ids.h" |
| 10 #include "ash/test/ash_test_base.h" | 10 #include "ash/test/ash_test_base.h" |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 // Mock a keyboard appearing. | 72 // Mock a keyboard appearing. |
| 73 aura::Window* keyboard_container = | 73 aura::Window* keyboard_container = |
| 74 Shell::GetContainer(root_window, kShellWindowId_VirtualKeyboardContainer); | 74 Shell::GetContainer(root_window, kShellWindowId_VirtualKeyboardContainer); |
| 75 ASSERT_TRUE(keyboard_container); | 75 ASSERT_TRUE(keyboard_container); |
| 76 keyboard_container->Show(); | 76 keyboard_container->Show(); |
| 77 keyboard::KeyboardControllerProxy* proxy = keyboard_controller->proxy(); | 77 keyboard::KeyboardControllerProxy* proxy = keyboard_controller->proxy(); |
| 78 aura::Window* keyboard_window = proxy->GetKeyboardWindow(); | 78 aura::Window* keyboard_window = proxy->GetKeyboardWindow(); |
| 79 keyboard_container->AddChild(keyboard_window); | 79 keyboard_container->AddChild(keyboard_window); |
| 80 keyboard_window->set_owned_by_parent(false); | 80 keyboard_window->set_owned_by_parent(false); |
| 81 const int kKeyboardHeight = 200; | 81 const int kKeyboardHeight = 200; |
| 82 gfx::Rect keyboard_bounds = keyboard::KeyboardBoundsFromWindowBounds( | 82 gfx::Rect keyboard_bounds = keyboard::FullWidthKeyboardBoundsFromRootBounds( |
| 83 keyboard_container->bounds(), kKeyboardHeight); | 83 root_window->bounds(), kKeyboardHeight); |
| 84 keyboard_window->SetBounds(keyboard_bounds); | 84 keyboard_window->SetBounds(keyboard_bounds); |
| 85 keyboard_window->Show(); | 85 keyboard_window->Show(); |
| 86 keyboard_controller->NotifyKeyboardBoundsChanging(keyboard_bounds); | 86 keyboard_controller->NotifyKeyboardBoundsChanging(keyboard_bounds); |
| 87 // Verify that test manager was notified of bounds change. | 87 // Verify that test manager was notified of bounds change. |
| 88 ASSERT_TRUE(manager->keyboard_bounds_changed()); | 88 ASSERT_TRUE(manager->keyboard_bounds_changed()); |
| 89 } | 89 } |
| 90 | 90 |
| 91 } // namespace test | 91 } // namespace test |
| 92 } // namespace ash | 92 } // namespace ash |
| OLD | NEW |