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

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

Issue 2814863002: cros: Allow JS to control virtual keyboard on sign-in screen. (Closed)
Patch Set: Remove login_display_host_impl.cc keyboard logic Created 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/webui/chromeos/login/core_oobe_handler.h ('k') | ui/keyboard/keyboard_controller.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 428e632cc99d1f7ac438731828365bc539e5d8be..4b1cd8ba9bf5098fd3fdba980f90c3710e1583c5 100644
--- a/chrome/browser/ui/webui/chromeos/login/core_oobe_handler.cc
+++ b/chrome/browser/ui/webui/chromeos/login/core_oobe_handler.cc
@@ -256,8 +256,8 @@ void CoreOobeHandler::ShowControlBar(bool show) {
CallJSOrDefer("showControlBar", show);
}
-void CoreOobeHandler::ShowPinKeyboard(bool show) {
- CallJSOrDefer("showPinKeyboard", show);
+void CoreOobeHandler::SetVirtualKeyboardShown(bool shown) {
+ CallJSOrDefer("setVirtualKeyboardShown", shown);
}
void CoreOobeHandler::SetClientAreaSize(int width, int height) {
@@ -301,6 +301,15 @@ void CoreOobeHandler::HandleEnableVirtualKeyboard(bool enabled) {
void CoreOobeHandler::HandleSetForceDisableVirtualKeyboard(bool disable) {
scoped_keyboard_disabler_.SetForceDisableVirtualKeyboard(disable);
+
+ if (disable) {
+ keyboard::KeyboardController* controller =
+ keyboard::KeyboardController::GetInstance();
+ if (controller) {
+ controller->HideKeyboard(
+ keyboard::KeyboardController::HIDE_REASON_AUTOMATIC);
+ }
+ }
}
void CoreOobeHandler::HandleEnableScreenMagnifier(bool enabled) {
@@ -441,7 +450,7 @@ void CoreOobeHandler::UpdateKeyboardState() {
if (keyboard_controller) {
gfx::Rect bounds = keyboard_controller->current_keyboard_bounds();
ShowControlBar(bounds.IsEmpty());
- ShowPinKeyboard(bounds.IsEmpty());
+ SetVirtualKeyboardShown(!bounds.IsEmpty());
}
}
« no previous file with comments | « chrome/browser/ui/webui/chromeos/login/core_oobe_handler.h ('k') | ui/keyboard/keyboard_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698