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

Side by Side Diff: ash/wm/lock_layout_manager_unittest.cc

Issue 1008453002: Allow javascript change the virtual keyboard window size and position freely in FLOATING mode (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: format Created 5 years, 8 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
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 "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
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
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
OLDNEW
« no previous file with comments | « ash/wm/always_on_top_controller_unittest.cc ('k') | ash/wm/system_modal_container_layout_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698