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/display/display_manager.h" | 5 #include "ash/display/display_manager.h" |
6 #include "ash/root_window_controller.h" | 6 #include "ash/root_window_controller.h" |
7 #include "ash/screen_util.h" | 7 #include "ash/screen_util.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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 keyboard::KeyboardController* keyboard = | 86 keyboard::KeyboardController* keyboard = |
87 keyboard::KeyboardController::GetInstance(); | 87 keyboard::KeyboardController::GetInstance(); |
88 ASSERT_TRUE(keyboard); | 88 ASSERT_TRUE(keyboard); |
89 if (show == keyboard->keyboard_visible()) | 89 if (show == keyboard->keyboard_visible()) |
90 return; | 90 return; |
91 | 91 |
92 if (show) { | 92 if (show) { |
93 keyboard->ShowKeyboard(true); | 93 keyboard->ShowKeyboard(true); |
94 if (keyboard->proxy()->GetKeyboardWindow()->bounds().height() == 0) { | 94 if (keyboard->proxy()->GetKeyboardWindow()->bounds().height() == 0) { |
95 keyboard->proxy()->GetKeyboardWindow()->SetBounds( | 95 keyboard->proxy()->GetKeyboardWindow()->SetBounds( |
96 keyboard::KeyboardBoundsFromWindowBounds( | 96 keyboard::FullWidthKeyboardBoundsFromRootBounds( |
97 keyboard->GetContainerWindow()->bounds(), | 97 Shell::GetPrimaryRootWindow()->bounds(), |
98 kVirtualKeyboardHeight)); | 98 kVirtualKeyboardHeight)); |
99 } | 99 } |
100 } else { | 100 } else { |
101 keyboard->HideKeyboard(keyboard::KeyboardController::HIDE_REASON_MANUAL); | 101 keyboard->HideKeyboard(keyboard::KeyboardController::HIDE_REASON_MANUAL); |
102 } | 102 } |
103 | 103 |
104 DCHECK_EQ(show, keyboard->keyboard_visible()); | 104 DCHECK_EQ(show, keyboard->keyboard_visible()); |
105 } | 105 } |
106 }; | 106 }; |
107 | 107 |
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
283 ScreenUtil::GetDisplayWorkAreaBoundsInParent(window.get()); | 283 ScreenUtil::GetDisplayWorkAreaBoundsInParent(window.get()); |
284 window->SetBounds(work_area); | 284 window->SetBounds(work_area); |
285 // Usually work_area takes Shelf into account but that doesn't affect | 285 // Usually work_area takes Shelf into account but that doesn't affect |
286 // LockScreen container windows. | 286 // LockScreen container windows. |
287 EXPECT_NE(work_area.ToString(), window->GetBoundsInScreen().ToString()); | 287 EXPECT_NE(work_area.ToString(), window->GetBoundsInScreen().ToString()); |
288 EXPECT_EQ(screen_bounds.ToString(), window->GetBoundsInScreen().ToString()); | 288 EXPECT_EQ(screen_bounds.ToString(), window->GetBoundsInScreen().ToString()); |
289 } | 289 } |
290 | 290 |
291 } // namespace test | 291 } // namespace test |
292 } // namespace ash | 292 } // namespace ash |
OLD | NEW |