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()); |
} |