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

Unified Diff: chrome/browser/ui/webui/chromeos/login/core_oobe_handler.cc

Issue 304153004: Center lock screen user pod when virtual keyboard is shown. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/webui/chromeos/login/core_oobe_handler.cc
diff --git a/chrome/browser/ui/webui/chromeos/login/core_oobe_handler.cc b/chrome/browser/ui/webui/chromeos/login/core_oobe_handler.cc
index 977fa6c4cb0ae00f9f36308d4a9f70bedb749087..d09f386981e52f1331c76d49161f774de508ef43 100644
--- a/chrome/browser/ui/webui/chromeos/login/core_oobe_handler.cc
+++ b/chrome/browser/ui/webui/chromeos/login/core_oobe_handler.cc
@@ -218,8 +218,8 @@ void CoreOobeHandler::ShowControlBar(bool show) {
CallJS("showControlBar", show);
}
-void CoreOobeHandler::SetKeyboardState(bool shown) {
- CallJS("setKeyboardState", shown);
+void CoreOobeHandler::SetKeyboardState(bool shown, const gfx::Rect& bounds) {
+ CallJS("setKeyboardState", shown, bounds.width(), bounds.height());
}
void CoreOobeHandler::SetClientAreaSize(int width, int height) {
@@ -358,17 +358,28 @@ void CoreOobeHandler::UpdateDeviceRequisition() {
}
void CoreOobeHandler::UpdateKeyboardState() {
- if (login::LoginScrollIntoViewEnabled()) {
+ const std::string& ui_type = oobe_ui_->display_type();
+ if ((ui_type != OobeUI::kLockDisplay &&
+ login::LoginScrollIntoViewEnabled()) ||
+ (ui_type == OobeUI::kLockDisplay &&
+ login::LockScrollIntoViewEnabled())) {
keyboard::KeyboardController* keyboard_controller =
keyboard::KeyboardController::GetInstance();
if (keyboard_controller) {
gfx::Rect bounds = keyboard_controller->current_keyboard_bounds();
- SetKeyboardState(!bounds.IsEmpty());
+ SetKeyboardState(!bounds.IsEmpty(), bounds);
}
}
}
void CoreOobeHandler::UpdateClientAreaSize() {
+ // Special case for screen lock. http://crbug.com/377904
+ // No need to update client area size so that virtual keyboard works.
+ if (oobe_ui_->display_type() == OobeUI::kLockDisplay &&
+ login::LockScrollIntoViewEnabled()) {
+ return;
+ }
+
const gfx::Size& size = ash::Shell::GetScreen()->GetPrimaryDisplay().size();
SetClientAreaSize(size.width(), size.height());
}
« no previous file with comments | « chrome/browser/ui/webui/chromeos/login/core_oobe_handler.h ('k') | chrome/browser/ui/webui/chromeos/login/oobe_ui.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698