OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/system_modal_container_layout_manager.h" | 5 #include "ash/wm/system_modal_container_layout_manager.h" |
6 | 6 |
7 #include "ash/root_window_controller.h" | 7 #include "ash/root_window_controller.h" |
8 #include "ash/session/session_state_delegate.h" | 8 #include "ash/session/session_state_delegate.h" |
9 #include "ash/shell.h" | 9 #include "ash/shell.h" |
10 #include "ash/shell_window_ids.h" | 10 #include "ash/shell_window_ids.h" |
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
175 keyboard::KeyboardController* keyboard = | 175 keyboard::KeyboardController* keyboard = |
176 keyboard::KeyboardController::GetInstance(); | 176 keyboard::KeyboardController::GetInstance(); |
177 ASSERT_TRUE(keyboard); | 177 ASSERT_TRUE(keyboard); |
178 if (show == keyboard->keyboard_visible()) | 178 if (show == keyboard->keyboard_visible()) |
179 return; | 179 return; |
180 | 180 |
181 if (show) { | 181 if (show) { |
182 keyboard->ShowKeyboard(true); | 182 keyboard->ShowKeyboard(true); |
183 if (keyboard->proxy()->GetKeyboardWindow()->bounds().height() == 0) { | 183 if (keyboard->proxy()->GetKeyboardWindow()->bounds().height() == 0) { |
184 keyboard->proxy()->GetKeyboardWindow()->SetBounds( | 184 keyboard->proxy()->GetKeyboardWindow()->SetBounds( |
185 keyboard::KeyboardBoundsFromWindowBounds( | 185 keyboard::FullWidthKeyboardBoundsFromRootBounds( |
186 keyboard->GetContainerWindow()->bounds(), 100)); | 186 Shell::GetPrimaryRootWindow()->bounds(), 100)); |
187 } | 187 } |
188 } else { | 188 } else { |
189 keyboard->HideKeyboard(keyboard::KeyboardController::HIDE_REASON_MANUAL); | 189 keyboard->HideKeyboard(keyboard::KeyboardController::HIDE_REASON_MANUAL); |
190 } | 190 } |
191 | 191 |
192 DCHECK_EQ(show, keyboard->keyboard_visible()); | 192 DCHECK_EQ(show, keyboard->keyboard_visible()); |
193 } | 193 } |
194 | 194 |
195 }; | 195 }; |
196 | 196 |
(...skipping 447 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
644 ShowKeyboard(true); | 644 ShowKeyboard(true); |
645 EXPECT_EQ(modal_size.ToString(), modal_window->bounds().size().ToString()); | 645 EXPECT_EQ(modal_size.ToString(), modal_window->bounds().size().ToString()); |
646 EXPECT_EQ(modal_origin.x(), modal_window->bounds().x()); | 646 EXPECT_EQ(modal_origin.x(), modal_window->bounds().x()); |
647 EXPECT_EQ(0, modal_window->bounds().y()); | 647 EXPECT_EQ(0, modal_window->bounds().y()); |
648 | 648 |
649 ShowKeyboard(false); | 649 ShowKeyboard(false); |
650 } | 650 } |
651 | 651 |
652 } // namespace test | 652 } // namespace test |
653 } // namespace ash | 653 } // namespace ash |
OLD | NEW |